I am using ChatGPT as my dataset factories
# random
n
I am using ChatGPT as my dataset factories
🤖 6
Prompt:
Copy code
I have some YAML entry and I need to generate a list of them
companies: type: pandas.CSVDataSet filepath: data/01_raw/companies.csv
Copy code
for example, if I have a country name `ireland`, I expect it to be
ireland_processed: type: pandas.CSVDataSet filepath: data/04_feature/ireland_processed.csv
Copy code
I now have a list of countries
country_names = [
    "Chile",
    "Finland",
    "Germany",
    "Greece",
    "Ireland",
    "Israel",
    "Italy",
    "Norway",
    "Peru",
    "Philippines",
    "Poland",
    "Portugal",
    "Romania",
    "Singapore",
]
Can you generate the yaml for me?```
Answer:
Copy code
Chile_processed:
  type: pandas.CSVDataSet
  filepath: data/04_feature/Chile_processed.csv

Finland_processed:
  type: pandas.CSVDataSet
  filepath: data/04_feature/Finland_processed.csv

Germany_processed:
  type: pandas.CSVDataSet
  filepath: data/04_feature/Germany_processed.csv

Greece_processed:
  type: pandas.CSVDataSet
  filepath: data/04_feature/Greece_processed.csv

Ireland_processed:
  type: pandas.CSVDataSet
  filepath: data/04_feature/Ireland_processed.csv

Israel_processed:
  type: pandas.CSVDataSet
  filepath: data/04_feature/Israel_processed.csv

Italy_processed:
  type: pandas.CSVDataSet
  filepath: data/04_feature/Italy_processed.csv

Norway_processed:
  type: pandas.CSVDataSet
  filepath: data/04_feature/Norway_processed.csv

Peru_processed:
  type: pandas.CSVDataSet
  filepath: data/04_feature/Peru_processed.csv

Philippines_processed:
  type: pandas.CSVDataSet
  filepath: data/04_feature/Philippines_processed.csv

Poland_processed:
  type: pandas.CSVDataSet
  filepath: data/04_feature/Poland_processed.csv

Portugal_processed:
  type: pandas.CSVDataSet
  filepath: data/04_feature/Portugal_processed.csv

Romania_processed:
  type: pandas.CSVDataSet
  filepath: data/04_feature/Romania_processed.csv

Singapore_processed:
  type: pandas.CSVDataSet
  filepath: data/04_feature/Singapore_processed.csv
🚀 1
j
🔥
a
Love this 😮 Although you are putting us out of a job
😂 1
Did you have to try a few times to get the right answer or phrase your question correctly or it just worked?
n
it’s the first prompt I tried. Though I fair amount of experiences with chatgpt now so I have better intuition at writing good prompts
👍 1
It’s very good at pattern matching, I can also ask it to generate the equivalent Python script and it’s perfect.
1000000 1
j
This reminds me that I need a bunch of made-up countries and data to replace the existing spaceflights set (https://github.com/kedro-org/kedro/issues/2008) and ChatGPT could be the way to go!