75+ Chatgpt prompts for data science | software developers (Bard AI Compatible)

Mani
Mani
Educating everyone with the beauty of programming!!
75+ Chatgpt prompts for data science | software developers (Bard AI Compatible)

Master the art of using ChatGPT as a data scientist, software developer

Introduction to ChatGPT Prompts for data science

ChatGPT + Data science is an ultimate combination for data scientists and software developers to save hundreds of hours. In this blog post, we’ll explore over 75+ ChatGPT prompts specifically tailored for data science applications. These prompts can be used to generate text for a wide range of tasks, including code generation, data preprocessing, model training, hyperparameter tuning, data exploration, and natural language processing, data analytics , data mining and a lot more.

In case you missed it, check out

50+ ChatGPT prompts for resume writing and job search

50+ Chatgpt prompts for Midjourney

Alright! Let’s get started!!

75+ chatgpt prompts for data science

Here are 75+ chatgpt prompts that you can instantly use for data science or data analytics etc.

1. Pretend as a SQL terminal

Prompt: Pretend you are as a SQL terminal in front of an example database. The database contains tables named “Users”, “Items”, “Orders”, “Ratings”. I will type queries and you will reply with what the terminal would show. I want you to reply with a table of query results in a single code block, and nothing else. Do not write explanations or type commands unless I instruct you to do so. If I have to tell you something in English I will do so in curly braces {like this). Alright let’s get started . My first command is ‘SELECT TOP 10 * FROM Items ORDER BY Id DESC’

2. Pretend as a Machine Learning Engineer

Prompt: Pretend you are a machine learning engineer. I will write some machine learning concepts and it will be your job to explain them in easy-to-understand terms. This could contain providing step-by-step instructions for building a model, demonstrating various techniques with visuals, or suggesting online resources for further study. My first suggestion request is “I have a dataset without labels. Which machine learning algorithm should I use?”

3. Clean Data

Prompt: I want you to act as a data analyst. I have a dataset of [describe dataset]. Please write python code to clean the data by removing missing values, duplicates, and outliers. Example: I want you to act as a data analyst. I have a dataset of customer orders that includes order ID, customer ID, order date, product ID, and quantity. Please write Python code to clean the data by removing missing values, duplicates, and outliers.

4. Generate Data

I want you to act as a fake data scientist. I need a dataset that has x rows and y columns: [insert column names]. Can you generate fake data for me.

5. Train Regression Model

Prompt: I want you to act as a data scientist and code for me. I have a dataset of [describe dataset]. Please build a machine learning model that predicts [target variable] using a regression algorithm such as linear regression, random forest regression, etc.

6. Train Clustering Model

Prompt: I want you to act as a data scientist and code for me. I have a dataset of [describe dataset]. Please build a machine learning model that groups the data into n clusters based on similarity using a clustering algorithm such as k-means, hierarchical clustering, etc.

7. Train Neural Network Model

Prompt: I want you to act as a data scientist and code for me. I have a dataset of [describe dataset]. Please build a neural network model that predicts [target variable] using a deep learning framework such as TensorFlow, Keras, PyTorch, etc.

Before trying out next prompts, don’t miss out this limited time sale

chatgpt prompts and ai tools download

8. Merge Data

Prompt: I want you to act as a data analyst. I have two datasets [describe datasets]. Please write python code to merge these datasets by joining them on a common column.

9. Reshape Data

Prompt: I want you to act as a data analyst. I have a dataset of [describe dataset]. Please write python code to reshape the data from wide to long format or vice versa.

10. Group Data

Prompt: I want you to act as a data analyst. I have a dataset of [describe dataset]. Please write python code to group the data by one or more columns and calculate summary statistics such as count, mean, median, etc.

11. Filter Data

Prompt: I want you to act as a data analyst. I have a dataset of [describe dataset]. Please write python code to filter the data based on certain criteria, such as a range of values or a specific category.

12. Calculate Moving Average

Prompt: I want you to act as a data analyst. I have a time series dataset [describe dataset]. Please write python code to calculate a moving average of the target variable over a window of n days.

13. Create Lagged Variables

Prompt: I want you to act as a data analyst. I have a time series dataset [describe dataset]. Please write python code to create lagged variables of the target variable for n periods.

14. Calculate Percentage Change

Prompt: I want you to act as a data analyst. I have a time series dataset [describe dataset]. Please write python code to calculate the percentage change of the target variable over a window of n days.

15. Normalize Data

Prompt: I want you to act as a data analyst. I have a dataset of [describe dataset]. Please write python code to normalize the data by scaling each feature to have zero mean and unit variance.

16. Parallelize Code

Prompt: I want you to act as a code optimizer. The following code is taking a long time to run. Can you parallelize it for me? [Insert code here]

17. Remove Special Characters in Python

Prompt: Assume you are a Python developer. Can you develop a script that removes special characters and symbols from a given dataset?

18. Optimize Numpy

Prompt: I want you to act as a code optimizer. Can you optimize the following numpy code? [Insert code here]

19. Refactor Code

Prompt: I want you to act as a software developer. Can you refactor the following code for me? [Insert code here]

20. Write Regex

Prompt: I want you to act as a coder. Please write me a regex in python that [describe regex]

21. Train Time Series

Prompt: I want you to act as a data scientist and code for me. I have a time series dataset [describe dataset]. Please build a machine learning model that predict [target variable]. Please use [time range] as train and [time range] as validation.

22. Feature Engineering

Prompt: I want you to act as a data scientist. I have a dataset of [describe dataset]. Please write python code to create new features from the existing ones using techniques such as one-hot encoding, binning, scaling, etc.

23. Memory Optimization

Prompt: I want you to act as a code optimizer. The following code is consuming too much memory. Can you optimize it to reduce memory usage? [Insert code here]

24. Optimize Regular Expressions

Prompt: I want you to act as a code optimizer. The following regular expression code is taking a long time to execute. Can you optimize it for me? [Insert code here]

25. Vectorize Code

Prompt: I want you to act as a code optimizer. The following code is taking a long time to execute. Can you vectorize it for me? [Insert code here]

26. Optimize Pandas Apply Function

Prompt: I want you to act as a code optimizer. The following Pandas apply function is taking a long time to execute. Can you optimize it for me? [Insert code here]

27. Optimize Matplotlib

Prompt: I want you to act as a code optimizer. The following Matplotlib code is taking a long time to execute. Can you optimize it for me? [Insert code here]

28. Optimize Image Processing

Prompt: I want you to act as a code optimizer. The following image processing code is taking a long time to execute. Can you optimize it for me? [Insert code here]

29. Optimize Network Communication

Prompt: I want you to act as a code optimizer. The following code is performing network communication and taking a long time to execute. Can you optimize it for me? [Insert code here]

30. Optimize Database Queries

Prompt: I want you to act as a code optimizer. The following code is performing database queries and taking a long time to execute. Can you optimize it for me? [Insert code here]

31. Optimize File I/O

Prompt: I want you to act as a code optimizer. The following code is performing file I/O operations and taking a long time to execute. Can you optimize it for me? [Insert code here]

32. Optimize GPU Computing

Prompt: I want you to act as a code optimizer. The following code is using a GPU and taking a long time to execute. Can you optimize it for me? [Insert code here]

33. Data Wrangling

Prompt: I want you to act as a data wrangler. I have a dataset of [describe dataset]. Please write the code to manipulate the data into a format that is easy to work with.

34. Analyze Dataset

Prompt: I want you to act as a data analyst. I have a dataset of [describe dataset]. Please analyze the data and provide insights.

35. Suggest Edge Cases

Prompt: I want you to act as a software developer. Please help me catch edge cases for this function [insert function] so that it won’t break production code.

36. Optimize Numpy

Prompt: I want you to act as a code optimizer. The following numpy code is taking too much time to execute. Can you help me optimize it? [Insert code here]

37. Optimize Regular Expression

Prompt: I want you to act as a code optimizer. The following regular expression code is taking too much time to execute. Can you help me optimize it? [Insert code here]

38. Optimize Machine Learning Model

Prompt: I want you to act as a machine learning optimizer. I have built a machine learning model using [insert library and model name], but it is not performing well. Can you help me optimize the model?

39. Optimize Deep Learning Model

Prompt: I want you to act as a deep learning optimizer. I have built a deep learning model using [insert library and model name], but it is taking too much time to train. Can you help me optimize the model?

40. Optimize Image Processing

Prompt: I want you to act as an image processing optimizer. I have a code that processes images, but it takes too much time to execute. Can you help me optimize it? [Insert code here]

41. Optimize Data Preprocessing

Prompt: I want you to act as a data preprocessing optimizer. I have a code that preprocesses data, but it takes too much time to execute. Can you help me optimize it? [Insert code here]

42. Optimize Natural Language Processing

Prompt: I want you to act as a natural language processing optimizer. I have a code that processes text, but it takes too much time to execute. Can you help me optimize it? [Insert code here]

43. Optimize Parallel Computing

Prompt: I want you to act as a parallel computing optimizer. I have a code that can be parallelized, but it takes too much time to execute. Can you help me optimize it? [Insert code here]

44. Optimize Memory Usage

Prompt: I want you to act as a memory optimizer. I have a code that is using too much memory. Can you help me optimize it? [Insert code here]

45. Refactor Code

Prompt: I want you to act as a code refactoring expert. Can you please refactor the following code? [Insert code here]

46. Optimize API Calls

Prompt: I want you to act as an API optimization expert. I have a code that makes API calls, but it takes too much time to execute. Can you help me optimize it? [Insert code here]

47. Optimize Web Scraping

Prompt: I want you to act as a web scraping optimization expert. I have a code that scrapes websites, but it takes too much time to execute. Can you help me optimize it? [Insert code here]

48. Implement Regular Expression Parser

Prompt: I want you to act as a software developer. I need a python function that parses a regular expression and returns a parse tree. The input is a string representing the regular expression.

49. Act as a Scientific Data Visualizer

Prompt: I want you to act as a scientific data visualizer. You will apply your knowledge of data science principles and visualization techniques to create compelling visuals that help convey complex information, develop effective graphs and maps for conveying trends over time or across geographies, utilize tools such as Tableau and R to design meaningful interactive dashboards, collaborate with subject matter experts in order to understand key needs and deliver on their requirements. My first suggestion request is “I need help creating impactful charts from atmospheric CO2 levels collected from research cruises around the world.”

50. Pivot Data

Prompt: I want you to act as a data analyst. I have a dataset of [describe dataset]. Please write python code to pivot the data by creating a new table with rows as one column, columns as another column, and values as a third column.

51. Feature importance

Prompt: I want you to act as a data scientist and explain the model’s results. I have trained a decision tree model. Please write code to find the most important features.

52. Write Documentation

Prompt: Imagine you are a software developer. Your task is to provide documentation for the function func1 shown below. [Insert function]

53. Improve Readability

Prompt: Imagine you are a code analyzer. Your task is to improve the following code for readability and maintainability. [Insert code]

54. Format SQL

Prompt: Imagine you are a SQL formatter. Your task is to format the following SQL code and convert all reserved keywords to uppercase. [Insert code]

55. Translate Between DBMS

Prompt: Imagine you are a coder and need to write SQL code for MySQL. What is the equivalent of PostgreSQL’s DATE_TRUNC function in MySQL?

56. Translate Python to R

Prompt: Imagine you are a code translator. Your task is to convert the following Python code to R. [Insert code]

57. Translate R to Python

Prompt: Imagine you are a code translator. Your task is to convert the following R code to Python. [Insert code]

58. Act as a Linux Terminal

Prompt: I want you to act as a linux terminal. I will type commands and you will reply with what the terminal should show. I want you to only reply with the terminal output inside one unique code block, and nothing else. do not write explanations. do not type commands unless I instruct you to do so. When I need to tell you something in English, I will do so by putting text inside curly brackets {like this}. My first command is pwd

59. Act as an Excel Sheet

Prompt: I want you to act as a text based excel. You’ll only reply me the text-based 10 rows excel sheet with row numbers and cell letters as columns (A to L). First column header should be empty to reference row number. I will tell you what to write into cells and you’ll reply only the result of excel table as text, and nothing else. Do not write explanations. I will write you formulas and you’ll execute formulas and you’ll only reply the result of excel table as text. First, reply me the empty sheet.

60. Google sheet formula

Prompt: I want you to act as google sheet expert that generates Google Sheets formula. Please generate a formula that [describe requirements]

61. Excel sheet formula

Prompt: I want you to act as excel sheet expert that generates excel Sheets formula. Please generate a formula that [describe requirements]

62. R Scripting

Prompt: As a data scientist, please write an R script that fulfills the following requirement: [Insert requirement here].

63. Shell Scripting

Prompt: As a Linux terminal expert, please write a shell script that fulfills the following requirement: [Describe requirements].

64. Excel VBA Development

Prompt: As an Excel VBA developer, please write a VBA code that performs the following function: [Insert function here].

65. Leetcode Problem Solution

Prompt: Given tables with certain columns, output specific results. Solve the following problem: [insert question]

67. Debug ChatGPT Code

Prompt: Your previously provided code is incorrect. Please identify and correct the error(s) in the code. Can you try again?

68. Explain Like Stack Overflow

Prompt: Pretend to be an expert on Stack Overflow and provide a comprehensive answer with code snippets, sample tables, and outputs to support your response to the technical question at hand: [insert technical question]

69. Web scraping with python

Prompt: Assume you are a Python developer. Please generate a script that can scrape data from a website and store it in a database.

70. Simulation study with python

Prompt: Assume you are a Python developer. Can you create a code that generates random data for a simulation study?

71. Import data from API with python

Prompt: Assume you are a Python developer. Can you write a script to import data from an API endpoint?

72. Synthetic data generation with python

Prompt: Assume you are a Python developer. Can you develop a code that generates synthetic data for a customer database?

73. Read excel data with python

Prompt: Assume you are a Python developer. Please create a script that can read data from an Excel file and store it in a Pandas dataframe.

74. Remove Irrelevant Columns in Python

Prompt: Assume you are a Python developer. Can you create a script that removes irrelevant columns from a dataset?

75. Text Normalization in Python

Prompt: Assume you are a Python developer. Can you write a code to perform text normalization on a given dataset?

76. Handle Non-ASCII Characters in Python

Prompt: Assume you are a Python developer. Can you create a code that handles non-ASCII characters in a given dataset?

77. Generate Density Plots in Python

Prompt: Assume you are a Python developer. Can you write a script that generates density plots for a given dataset?

78. Identify Anomalies in Python

Prompt: Assume you are a Python developer. Can you develop a code that identifies anomalies in a given dataset?

Conclusion:

ChatGPT is a powerful tool for generating informative and insightful responses to a wide range of prompts. Combining AI with code can exponentially increase our productivity.

Hope you had fun trying these prompts of chatgpt prompts for datascience. AI is the current and upcoming trend. To keep yourself updated with latest trends subscribe to our newsletter for latest AI + Chatgpt prompts news. Also follow us on social media on twitter at tipseason


We hope you like this post. If you have any questions or suggestions or need any other additional info, please comment below.

We have started a coding community for most frequently used real world coding tips. You can join us here
TipSeason Discord channel
TipSeason Facebook Group

Free AI Prompts + Tools every week

* indicates required
As a bonus, here is an amazing list of prompts for midjourney

What do you want to learn next ? Drop a comment below!