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
Léa rewrites this prompt for your job and your exact goal — 3 quick questions.
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 4800+ 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 HR Data Analysis
HR data analysis has become a strategic lever for companies looking to optimize human capital management. GitHub Copilot, integrated
Prompt GitHub Copilot for Optimizing Advertisements
GitHub Copilot, the AI-powered coding assistant, is not limited to software development. It can become a formidable ally for optimizing your ad campaig
Prompt GitHub Copilot for Translating a Text
GitHub Copilot, the AI development assistant created by GitHub and OpenAI, is not limited to code generation. Integrated directly into your editor (VS
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...
Go further
Get new prompts every week
Join our newsletter.