# Prompting LLMs for Data Science.md

> Source: <https://gist.github.com/sohaibdevv/6c9b55350dc1675f93248d861309a06d>
> Published: 2026-09-07 19:02:40+00:00

1. Train Classification Model: "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 predict [target variable]."[cite: 1]

2. Automatic Machine Learning: "I want you to act as an automatic machine learning (AutoML) bot using TPOT for me. I am working on a model that predicts [...]. Please write python code to find the best classification model with the highest AUC score on the test set."[cite: 1]

3. Tune Hyperparameter: "I want you to act as a data scientist and code for me. I have trained a [model name]. Please write the code to tune the hyper parameters."[cite: 1]

4. Train Time Series: "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."[cite: 1]

5. Address Imbalance Data: "I want you to act as a coder. I have trained a machine learning model on an imbalanced dataset. The predictor variable is the column [Insert column name]. In python, how do I oversample and/or undersample my data?"[cite: 1]

6. Get Feature Importance: "I want you to act as a data scientist and explain the model's results. I have trained a decision tree model and I would like to find the most important features. Please write the code."[cite: 1]

7. Explain Model with Lime: "I want you to act as a data scientist and explain the model's results. I have trained a [library name] model and I would like to explain the output using LIME. Please write the code."[cite: 1]

8. Explain Model with Shap: "I want you to act as a data scientist and explain the model's results. I have trained a scikit-learn XGBoost model and I would like to explain the output using a series of plots with Shap. Please write the code."[cite: 1]

9. Suggest Feature Engineering: "I want you to act as a data scientist and perform feature engineering. I am working on a model that predicts [insert feature name]. There are columns: [Describe columns]. Can you suggest features that we can engineer for this machine learning problem?"[cite: 1]

Data Manipulation, Exploration & Generation

10. Explore Data: "I want you to act as a data scientist and code for me. I have a dataset of [describe dataset]. Please write code for data visualisation and exploration."[cite: 1]

11. Generate Data: "I want you to act as a fake data generator. I need a dataset that has x rows and y columns: [insert column names]"[cite: 1]

12. Visualize Data with Matplotlib: "I want you to act as a coder in python. I have a dataset [name] with columns [name]. [Describe graph requirements]"[cite: 1]

13. Visualize Image Grid Matplotlib: "I want you to act as a coder. I have a folder of images. [Describe how files are organised in directory] [Describe how you want images to be printed]"[cite: 1]

14. Create NumPy Array: "I want you to act as a data scientist. I need to create a numpy array. This numpy array should have the shape of (x,y,z). Please initialize the numpy array with random values."[cite: 1]

15. Validate Column: "I want you to act as a data scientist. Please write code to test if that my pandas Dataframe [insert requirements here]"[cite: 1]

Code Writing & Translation

16. Write Regex: "I want you to act as a coder. Please write me a regex in python that [describe regex]"[cite: 1]

17. Write Multithreaded Functions: "I want you to act as a coder. Can you help me parallelize this code across threads in python?"[cite: 1]

18. Write Unit Test: "I want you to act as a software developer. Please write unit tests for the function [Insert function]. The test cases are: [Insert test cases]"[cite: 1]

19. Translate Between DBMS: "I want you to act as a coder and write SQL code for MySQL. What is the equivalent of PostgreSQL's DATE_TRUNC for MySQL?"[cite: 1]

20. Translate Python to R: "I want you to act as a code translator. Can you please convert the following code from python to R? [Insert code]"[cite: 1]

21. Translate R to Python: "I want you to act as a code translator. Can you please convert the following code from R to python? [Insert code]"[cite: 1]

22. Write Google Sheets Formula: "I want you to act as a bot that generates Google Sheets formula. Please generate a formula that [describe requirements]"[cite: 1]

23. Write R: "I want you to act as a data scientist using R. Can you write an R script that [Insert requirement here]"[cite: 1]

24. Write Shell: "I want you to act as a Linux terminal expert. Please write the code to [describe requirements]"[cite: 1]

25. Write VBA: "I want you to act as an Excel VBA developer. Can you write a VBA that [Insert function here]?"[cite: 1]

Code Optimization & Debugging

26. Compare Function Speed: "I want you to act as a software developer. I would like to compare the efficiency of two algorithms that performs the same thing in python. Please write code that helps me run an experiment that can be repeated for 5 times. Please output the runtime and other summary statistics of the experiment. [Insert functions]"[cite: 1]

27. Improve Code Speed: "I want you to act as a software developer. Please help me improve the time complexity of the code below. [Insert code]"[cite: 1]

28. Optimize Pandas: "I want you to act as a code optimizer. Can you point out what's wrong with the following Pandas code and optimize it? [Insert code here]"[cite: 1]

29. Optimize Pandas Again: "I want you to act as a code optimizer. Can you point out what's wrong with the following Pandas code and optimize it? [Insert code here]"[cite: 1]

30. Optimize Python: "I want you to act as a code optimizer. The code is poorly written. How do I correct it? [Insert code here]"[cite: 1]

31. Optimize SQL: "I want you to act as an SQL code optimizer. The following code is slow. Can you help me speed it up? [Insert SQL]"[cite: 1]

32. Simplify Python: "I want you to act as a code simplifier. Can you simplify the following code?"[cite: 1]

33. Improve Readability: "I want you to act as a code analyzer. Can you improve the following code for readability and maintainability? [Insert code]"[cite: 1]

34. Suggest Edge Cases: "I want you to act as a software developer. Please help me catch edge cases for this function [insert function]"[cite: 1]

35. Suggest Time Complexity: "I want you to act as a software developer. Please compare the time complexity of the two algorithms below. [Insert two functions]"[cite: 1]

36. Correct Own Gen AI Code: "Your above code is wrong. [Point out what is wrong]. Can you try again?"[cite: 1]

37. Correct Python Code: "I want you to act as a software developer. This code is supposed to [expected function]. Please help me debug this python code that cannot be run. [Insert function]"[cite: 1]

38. Correct SQL Code: "I want you to act as a SQL code corrector. This code does not run in [your DBMS, e.g. PostgreSQL]. Can you correct it for me? [SQL code here]"[cite: 1]

39. Troubleshoot PowerBI Model: "I want you to act as a PowerBI modeler. Here is the details of my current project. [Insert details]. Do you see any problems with the table?"[cite: 1]

Data Analytics & SQL Specifics

40. Format SQL: "I want you to act as a SQL formatter. Please format the following SQL code. Please convert all reserved keywords to uppercase [Insert requirements]. [Insert Code]"[cite: 1]

41. Suggest A/B Testing Steps: "I want you to act as a statistician. [Describe context] Please design an A/B test for this purpose. Please include the concrete steps on which statistical test I should run."[cite: 1]

42. Create Running Average: "I want you to act as a data scientist and write SQL code for me. I have a table with two columns [Insert column names]. I would like to calculate a running average for [which value]. What is the SQL code that works for PostgreSQL 14?"[cite: 1]

43. Solve Leetcode Question: "Assume you are given the tables... with the columns... Output the following..."[cite: 1]

Explanation, Summarization & Documentation

44. Explain Python: "I want you to act as a code explainer. What is this code doing? [Insert code]"[cite: 1]

45. Explain SQL: "I want you to act as a data science instructor. Can you please explain to me what this SQL code is doing? [Insert SQL code]"[cite: 1]

46. Explain Google Sheets Formula: "I want you to act as a Google Sheets formula explainer. Explain the following Google Sheets command. [Insert formula]"[cite: 1]

47. Write Documentation: "I want you to act as a software developer. Please provide documentation for func1 below. [Insert function]"[cite: 1]

48. Explain to Five-Year-Old: "I want you to act as a data science instructor. Explain [concept] to a five-year-old."[cite: 1]

49. Explain to Undergraduate: "I want you to act as a data science instructor. Explain [concept] to an undergraduate."[cite: 1]

50. Explain to Professor: "I want you to act as a data science instructor. Explain [concept] to a professor."[cite: 1]

51. Explain to Business Stakeholder: "I want you to act as a data science instructor. Explain [concept] to a business stakeholder."[cite: 1]

52. Explain Like Stackoverflow: "I want you to act as an answerer on StackOverflow. You can provide code snippets, sample tables and outputs to support your answer. [Insert technical question]"[cite: 1]

53. Format Tables: "I want you to act as a document formatter. Please format the following into a nice table for me to place in Google Docs? [insert text table here]"[cite: 1]

54. Summarize Book: "I want you to act as a technical book summarizer. Can you please summarize the book [name] with 5 main points?"[cite: 1]

55. Summarize Paper: "I want you to act as an academic. Please summarise the paper [...] in simple terms in one paragraph."[cite: 1]

Career Planning & Support

56. Suggest Dataset: "I want you to act as a data science career coach. I want to build a predictive model for [...]. At the same time, I would like to showcase my knowledge in [...]. Can you please suggest the five most relevant datasets for my use case?"[cite: 1]

57. Suggest Portfolio Ideas: "I want you to act as a data science coach. My background is in [...] and I would like to [career goal]. I need to build a portfolio of data science projects that will help me land a role in [...] as a [...]. Can you suggest five specific portfolio projects that will showcase my expertise in [...] and are of relevance to [company]?"[cite: 1]

58. Suggest Resources: "I want you to act as a data science coach. I would like to learn about [topic]. Please suggest 3 best specific resources. You can include [specify resource type]"[cite: 1]

59. Career Coaching: "I want you to act as a career advisor. I am looking for a role as a [role name]. My background is [...]. How do I land the role and with what resources exactly in 6 months?"[cite: 1]

60. Provide Emotional Support: "I want you to provide emotional support to me. [Explain problem here.]"[cite: 1]
