7 ChatGPT Prompts To be a Better Data Scientist
Here are the best prompts I am using daily as a Data Scientist
As the popularity of ChatGPT increases, a new term is entering our lives: prompts. It is essentially the instructions that we provide to large language models, such as ChatGPT.
These prompts will not just help you save time but also increase your work quality, from code transition to creating impressive visuals.
In this article, you’ll find a detailed explanation of each and the prompts for them. Let’s get started.
Code Transition between Languages

Code transition is one of the best coding actions that Python can perform. It can also run Python scripts, but if you plan to check other coding languages through ChatGPT, consider exploring new ChatGPT plug-ins.
Here is the code transition prompt that you can easily integrate into your workflow.
I want you to act as a coder and convert the Python code to MySQL?A/B Testing in Machine Learning

You can write Regression, Classification, or Clustering between [ ] . By doing so, you will have a script that will help you find the best-performing Machine Learning model for your task.
I want you to act as a Data Scientist, and write a Python code, by following instructions.
Test 6 different [ ] model.
Use [ ] evaluation metrics.
Save these metrics into the dataframe.Code Optimization
If you think you can optimize your code by avoiding for loops or using list comprehension instead of an if-else block, consider asking ChatGPT first.
I don’t like relying on ChatGPT that much. I think you should write your own code in the first place, but why not take advantage of it if you have the chance?
Here is my code.
[Your Code]
Can you help me optimize it for better performance?
(Also make it shorter, if the script met the above condition.)Debugging
This is my best. When I got an error in the code, if I could not find the error at first glance, here is my prompt.
Here is my code:
[code]
Here is my error:
[error]
Debug my code to avoid this error.Creating Fake Data

Now, I, of course, advise you to collect data from the web if it is possible. If not, Kaggle is always a good option. But if these two options are not available to you, you can always create fake data, which serves your purpose.
I will test my regression script.
Act as a Data Scientist and create a dummy dataset, 1000 rows and 10 columns.
My target variable should be a numerical.
Name the column, like if it is a real life data.
Explain the dataset, after creation.Understanding the Code

My second best. ChatGPT is very good at it. But I highly advise you to test the code it gives to you, because ChatGPT’s code will be before 2021, so the coding library might be updated between.
Can you explain the following code?
(Suppose I am a beginner Data Scientist.)Create Impressive Visuals

Impressive visuals are key to a successful project because they have a significant impact on us. That’s why there are several conditions in the following prompt. Try this for your code.
Act as a data analyst, who want to create impressive visuals.
Create clear visuals that discovers hidden patterns from my data.
Make graphs which maps to show trends.
Use Python, and make an interactive version of this graph too.
Here is my data : Final Thoughts
Here, we explored seven different ChatGPT prompts that cover a wide range of Data Science tasks, from code conversion to creating impressive visuals.
These ChatGPT Prompts will enhance the quality of your tasks and also help save a significant amount of time.
“Machine learning is the last invention that humanity will ever need to make.”
Nick Bostrom




