I find the key to getting what you want is to prepare it well. Start by explaining to ChatGPT that you are a data analyst and explain the scenario you want data for. Going into real detail here will improve your results down the line.
E.g.,
I am a data analyst for a small second hand book reselling company called "Wrenegade Pages". I want to create a KPI dashboard for the owners of the company to get a high level overview of their business performance over the past ten years....... Really go crazy on the detail here ..... The dataset must be produced using a Python script.
Here, you can start to explain some trends you might like to see, such as more sales in winter than summer, etc....
Once ChatGPT has created a Python script for you, I would suggest using Jupyter Notebook to run your script. This is an open source website where you can run Python scripts, and I find it really easy to use.
If the Python script returns errors just take the error back to ChatGPT and it will fix it. (You can also ask ChatGPT to improve the performance of the script.)