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 directly into your development environment, offers valuable assistance in quickly writing data analysis scripts related to human resources: turnover, absenteeism, performance, salary equity, or employee satisfaction. Thanks to its contextual understanding of code, Copilot can generate data cleaning functions, relevant visualizations, and predictive models adapted to HR issues. Whether you work with Python and pandas, R, or SQL, Copilot significantly accelerates the data exploration and transformation process. This prompt is designed to guide Copilot to produce a complete, structured, and documented HR analysis pipeline capable of transforming raw data into actionable insights for decision-makers. It is intended for both HR data analysts and developers tasked with building people analytics dashboards.
The prompt
Complete HR data analysis with Python
Dataset: CSV file containing the following columns:
employee_id, name, department, position, hire_date, departure_date,
salary, performance_rating, satisfaction, absence_days, training_hours
Goal: create a complete HR analysis pipeline that includes:
1. Data loading and cleaning (missing values, types, duplicates)
2. Calculation of key HR KPIs: turnover rate by department, average seniority,
absenteeism ratio, salary gap by gender and position
3. Correlation analysis between satisfaction, performance, and turnover
4. Segmentation of employees at risk of leaving (simple predictive scoring)
5. Visualizations: salary distribution, correlation heatmap,
turnover evolution by quarter, inter-department comparison
6. Export of a summary HTML report with key findings
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from datetime import datetime
def load_and_clean_hr_data(csv_file: str) -> pd.DataFrame:
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 provides Copilot with a structured context including the exact data schema, a numbered list of specific objectives, and a typed function signature that jumpstarts generation. The combination of descriptive comments and relevant imports allows Copilot to infer the complete pipeline architecture and produce coherent code step by step. The breakdown into six phases guides the model toward exhaustive coverage without ambiguity about the expected deliverable.
Expected result
Variants by level
FAQ
Which HR data formats are best supported by GitHub Copilot for analysis?
How can I ensure the confidentiality of HR data when using GitHub Copilot?
Can Copilot generate analyses compliant with French HR legal obligations?
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.