Prompt GitHub Copilot for Data Analysis
GitHub Copilot, the AI assistant developed by GitHub and OpenAI, is not limited to code generation. It is a powerful tool for analyzing data directly in your development environment. Whether you work with CSV files, SQL databases, or pandas DataFrames, Copilot can help you explore, clean, transform, and visualize your data without leaving your IDE. By formulating precise prompts, you can ask it to detect anomalies, calculate descriptive statistics, identify correlations, or generate relevant charts. Copilot's major advantage for data analysis lies in its ability to understand the context of your existing code: it adapts to the libraries you use (pandas, numpy, matplotlib, seaborn) and proposes analyses consistent with the structure of your data. This guide presents the best prompts to leverage GitHub Copilot in your data analysis tasks, from initial cleaning to creating actionable visual reports.
The prompt
Analyze the DataFrame 'df' containing sales data. Perform the following steps: 1) Display a complete statistical summary (mean, median, standard deviation, quartiles) for each numerical column. 2) Identify missing values and propose a treatment strategy appropriate for each column's type. 3) Detect outliers using the IQR method and flag the affected rows. 4) Compute the correlation matrix between numerical variables and identify strongly correlated pairs (|r| > 0.7). 5) Generate a visual report with: a distribution histogram for each key variable, a correlation heatmap, and a time evolution chart if a date column exists. Use pandas, numpy, matplotlib, and seaborn. Comment each step of the code.
Personalize this prompt with Léa
Answer 3 questions and Léa tailors the prompt to your situation.
Why it works
This prompt is effective because it breaks down the analysis into clear sequential steps, allowing Copilot to generate structured and complete code. By specifying the expected libraries and precise thresholds (like |r| > 0.7 for correlations), ambiguity is eliminated and a directly usable result is obtained. The request for comments forces Copilot to produce documented and understandable code.
Expected result
Variants by level
FAQ
Can GitHub Copilot directly analyze Excel or CSV files without prior code?
How to get professional-quality visualizations with Copilot for my analyses?
Can Copilot help me clean dirty data before analysis?
Related prompts
How to use this prompt
- Copy the prompt with the button above.
- Paste it into ChatGPT, Claude or your favorite AI assistant.
- Replace the bracketed variables with your details, then refine the result.
About Prompt Guide
Prompt Guide is a free library of 2500+ ready-to-use prompts for ChatGPT, Claude and other AIs, with guides to learn prompting and tools to build and optimize your own prompts.
More prompts to explore
Prompt GitHub Copilot for Writing a Blog Article
GitHub Copilot, the coding assistant powered by AI from OpenAI and GitHub, is not limited to code generation. Thanks to its advanced contextual understanding,...
Prompt GitHub Copilot for Writing a Newsletter
GitHub Copilot, the AI-powered code assistant from GitHub, is not limited to code generation. Thanks to its ability to understand context and generate structured text, it becomes a valuable ally for writing professional newsletters directly from your code editor.
Prompt GitHub Copilot for Writing a Report
GitHub Copilot, GitHub's AI assistant integrated into code editors, is not limited to code generation. Its language engine can be exploited to...
Prompt GitHub Copilot for Writing a Sales Page
GitHub Copilot, initially designed as a development assistant, proves to be a remarkably effective tool for writing compelling sales pages.
Prompt GitHub Copilot for Writing a Video Script
GitHub Copilot, GitHub's AI development assistant, is not limited to code generation. Thanks to its advanced natural language understanding, it excels
Prompt GitHub Copilot for Writing LinkedIn Posts
GitHub Copilot, mainly known as a development assistant, has remarkable text generation capabilities that extend far beyond code. By leveraging its AI engine directly from your editor, you can craft impactful LinkedIn posts without leaving your workflow.
Go further
Get new prompts every week
Join our newsletter.