В наши дни стандартные источники данных, такие как списки стран и списки валют, легко доступны в Интернете. Однако обогащение или переформатирование этих данных часто может занимать много времени. В этой статье мы рассмотрим, как можно использовать ChatGPT для эффективного создания и улучшения данных. Мы приведем примеры для демонстрации возможностей ChatGPT.
Пример 1 — Получение списка мировых валют в формате CSV
Я попросил ChatGPT предоставить мне список валют, включая код культуры, в формате CSV.
Примечание: здесь ответы были сокращены для удобства чтения.
Это был мой запрос:
list all currencies with their culture code in csv format. e.g. "Turkish Lira", "tr-TR"
ChatGPT ответил примерно так, как я просил:
Currency,Culture Code Afghan Afghani,af-AF Albanian Lek,sq-AL Algerian Dinar,ar-DZ Angolan Kwanza,pt-AO
Изначально в ответе отсутствовали двойные кавычки и трехзначный код валюты. Однако после уточнения моего запроса я получил улучшенный ответ, соответствующий моим требованиям. Обновленный ответ включал название валюты, код культуры и трехзначный код валюты в правильном формате CSV.
also include the 3 digit currency code and add quotes around the strings
Это дало мне гораздо лучший ответ:
Certainly! Here's an updated list of currencies with their respective culture codes and three-digit currency codes in CSV format: "Currency","Culture Code","Currency Code" "Afghan Afghani","af-AF","AFN" "Albanian Lek","sq-AL","ALL" "Algerian Dinar","ar-DZ","DZD" "Angolan Kwanza","pt-AO","AOA"
Доступ к данным можно получить здесь: https://github.com/phayman/medium/blob/75e417ad6387cb20c27e677a973caee86744966a/ChatGPT-Examples/Currencies.csv
Пример 2 — Обогащение данных
Чтобы обогатить список компаний, особенно тех, которые перечислены в A&P 500, я хотел включить такую информацию, как страна головного офиса, сектор и краткое описание каждой компании.
I'm going to paste a list of companies, return the list in CSV format including data about the companies such as headoffice country, sector, short description
Вставив список компаний и задав соответствующие вопросы, ChatGPT предоставил исчерпывающий ответ.
3M A. O. Smith Abbott Laboratories AbbVie Abiomed Accenture Activision Blizzard ADM Adobe Advance Auto Parts Advanced Micro Devices AES Corp Aflac Agilent Technologies Air Products & Chemicals Akamai Technologies Alaska Air Group Albemarle Corporation Alexandria Real Estate Equities
Ответ включал название компании, страну штаб-квартиры, сектор и краткое описание каждой компании, все в формате CSV.
Here's the list of companies you provided, including their headquarter country, sector, and a short description in CSV format: Company,Headquarter Country,Sector,Description 3M,United States,Manufacturing,"3M is a diversified technology company that operates through five segments: Industrial, Safety and Graphics, Health Care, Electronics and Energy, and Consumer. They offer a wide range of products, including adhesives, abrasives, films, and more." A. O. Smith,United States,Manufacturing,"A. O. Smith is a manufacturer of water heating equipment and water treatment products. They provide residential and commercial water heaters, boilers, and water purification systems." Abbott Laboratories,United States,Healthcare,"Abbott Laboratories is a global healthcare company that specializes in the discovery, development, manufacture, and sale of a wide range of healthcare products. They offer diagnostics, medical devices, nutrition products, and pharmaceuticals." AbbVie,United States,Pharmaceuticals,"AbbVie is a pharmaceutical company that focuses on the discovery, development, and commercialization of advanced therapies. They specialize in areas such as immunology, oncology, and neuroscience." Abiomed,United States,Medical Devices,"Abiomed is a leading provider of medical devices that support or replace the failing heart. They develop and manufacture products such as heart pumps and artificial heart systems." Accenture,Ireland,Consulting,"Accenture is a global professional services company that provides a wide range of consulting, technology, and outsourcing services. They help clients across various industries with strategy, digital transformation, and business operations." Activision Blizzard,United States,Entertainment,"Activision Blizzard is a leading interactive entertainment company that develops and publishes video games. They are known for popular franchises such as Call of Duty, World of Warcraft, and Overwatch." ADM,United States,Agriculture,"ADM (Archer Daniels Midland) is a global food processing and commodities trading company. They are involved in the production of ingredients for food and animal feed, as well as trading agricultural commodities." Adobe,United States,Technology,"Adobe is a multinational software company that provides a range of creative and digital marketing software solutions. Their products include Photoshop, Illustrator, Acrobat, and the Adobe Creative Cloud suite." Advance Auto Parts,United States,Retail,"Advance Auto Parts is a leading automotive aftermarket parts retailer. They offer a wide selection of automotive products, including replacement parts, accessories, and maintenance items." Advanced Micro Devices,United States,Technology,"Advanced Micro Devices (AMD) is a semiconductor company that designs and manufactures computer processors, graphics cards, and related technologies. They are known for their Ryzen and Radeon product lines." AES Corp,United States,Utilities,"AES Corp is a global power company that owns and operates a diverse portfolio of electricity generation and distribution businesses. They focus on providing sustainable and affordable energy solutions." Aflac,United States,Insurance,"Aflac is a leading provider of supplemental insurance products in the United States. They offer policies that provide financial protection against medical and other expenses not covered by primary health insurance." Agilent Technologies,United States,Life Sciences,"Agilent Technologies is a life sciences and diagnostics company that provides analytical instruments, software, services, and consumables. Their products are used in research, healthcare, and environmental testing." Air Products & Chemicals,United States,Chemicals,"Air Products & Chemicals is a global supplier of industrial gases, performance materials, equipment, and technology. They serve various industries, including chemicals, refining, and electronics." Akamai Technologies,United States,Technology,"Akamai Technologies is a leading content delivery network (CDN) and cloud service provider. They help businesses deliver and optimize online content, applications, and security services." Alaska Air Group,
Пример 3 — Фильтрация данных
Используя ChatGPT, вы также можете фильтровать данные по определенным критериям. В этом примере я предоставил список компаний и попросил ChatGPT указать компании в секторе здравоохранения.
I'm going to paste a list of companies, can you tell me which companies are in the healthcare sector 3M A. O. Smith Abbott Laboratories AbbVie Abiomed Accenture Activision Blizzard ADM Adobe Advance Auto Parts Advanced Micro Devices AES Corp Aflac Agilent Technologies Air Products & Chemicals Akamai Technologies Alaska Air Group Albemarle Corporation Alexandria Real Estate Equities Align Technology Allegion Alliant Energy Allstate Corp Alphabet (Class A) Alphabet (Class C) Altria Group Amazon Amcor
Ответ точно отфильтровал список, указав названия компаний в секторе здравоохранения.
Based on the list you provided, the following companies are in the healthcare sector: Abbott Laboratories AbbVie Abiomed Align Technology Please note that this is not an exhaustive list, and there may be other companies in the healthcare sector not mentioned in the list you provided.
Пример 4. Получите список стран с их культурным кодом.
Как и в вопросе о валюте, я попросил ChatGPT сгенерировать список стран вместе с их соответствующими кодами культуры в формате CSV.
list all countries with their culture code in csv format
В ответе был представлен исчерпывающий список стран с кодами их культур, а данные были правильно отформатированы в формате CSV.
Certainly! Here is the list of countries with their culture codes in CSV format with quoted strings: "Country","Culture Code" "Afghanistan","af" "Albania","sq" "Algeria","ar" "Andorra","ca" "Angola","pt" "Antigua and Barbuda","en" "Argentina","es" "Armenia","hy" "Australia","en"
Полные данные ответа здесь: https://github.com/phayman/medium/blob/75e417ad6387cb20c27e677a973caee86744966a/ChatGPT-Examples/Countries.csv
Заключение
ChatGPT демонстрирует свою способность эффективно генерировать и улучшать данные. От предоставления списков валют, обогащения данных компании, фильтрации данных на основе критериев до создания списков стран с кодами культуры, ChatGPT оказывается ценным инструментом для задач создания и обогащения данных. Его универсальность и точность делают его полезным ресурсом для различных приложений, связанных с данными.
Бесплатная шпаргалка по ChatGPT от Artificial Corner
Мы предлагаем нашим читателям бесплатную шпаргалку. Подпишитесь на нашу рассылку с более чем 30 000 человек и получите нашу бесплатную памятку по ChatGPT.