Getting started with Python and Pandas for analysis
Complete beginner guide to data analysis with Python Pandas, from data loading to first visualizations.
Paste in your AI
Paste this prompt in ChatGPT, Claude or Gemini and customize the variables in brackets.
I'm new to data analysis in Python. My data covers [DATA_DESCRIPTION] and comes in a [FILE_FORMAT] file (CSV, Excel or JSON). I'm working in [ENVIRONMENT] (Jupyter Notebook, Google Colab or VS Code).
The file has about [ROW_COUNT] rows. The main columns are [COLUMNS]. I'd like to run [TYPE_OF_ANALYSIS].
Walk me through the analysis in pandas:
- Install and import pandas, NumPy, Matplotlib and seaborn.
- Load the file and handle character encoding issues and missing values.
- Get a first look at the data using shape, dtypes, head(), describe() and info().
- Clean up NaN values, duplicates and incorrect column types.
- Select, filter and sort rows. Show how loc, iloc and query work.
- Use groupby and aggregation to calculate statistics for each category.
- Create three charts that suit the data using Matplotlib or seaborn.
- Save the results to CSV and Excel.
Give me the complete code with a comment on each line. Explain each concept when you first use it and point out common mistakes at each step.
Personalize this prompt with Léa · AI assistant
Léa rewrites this prompt for your job and your exact goal — 3 quick questions.
Why this prompt works
Line-by-line comments explain what each pandas operation does as you run it. The notes on common errors help you work out what went wrong at each step.
Use Cases
Expected Output
Complete line-by-line commented Python Pandas code with conceptual explanations and 3 visualizations.
Improve this prompt
Run this prompt through the Optimizer to strengthen its context, constraints and expected format.
Improve this prompt with the OptimizerComments
Be the first to comment on this prompt.
Glossary Terms
📬 Get new prompts every week
Join our newsletter and never miss a prompt.
Go further
Similar Prompts
Claude Prompt to Analyze Market Trends
Market trend analysis is a strategic exercise that requires cross-referencing economic, behavioral, and sectoral data to identify weak signals and underlying movements. Claude excels at this task thanks to its ability to synthesize large amounts of information, structure multi-dimensional analyses, and formulate well-argued hypotheses. Whether you are an entrepreneur seeking to validate an opportunity, an analyst mapping an industry, or a marketer preparing a launch, Claude saves hours of research by producing structured, nuanced, and actionable analyses. By providing precise context about your target market, objectives, and constraints, you get a panoramic view of the dynamics at play: technological developments, regulatory changes, shifts in consumer behavior, and competitive repositioning. AI does not replace field monitoring, but it significantly accelerates the exploration and structuring phase of information, allowing you to focus your human expertise on strategic interpretation and decision-making.
ChatGPT Prompt for Data Analysis
Data analysis has become an indispensable strategic lever for businesses and professionals. Yet extracting relevant insights from raw datasets remains a technical challenge that typically requires skills in statistics, programming, or specialized tools like advanced Excel, Python, or R. ChatGPT radically transforms this approach by allowing anyone to analyze complex data through natural language instructions. Whether you're working on sales data, survey results, marketing metrics, or financial indicators, a well-structured prompt enables you to obtain statistical analyses, correlations, trends, and actionable recommendations in seconds. The key lies in how you formulate your request: a precise prompt that defines the context, the type of analysis desired, and the expected output format will yield significantly more usable results than a vague query. In this guide, you'll find optimized prompts to get the most out of ChatGPT for your data analyses, regardless of your expertise level.
Write an ML system design
Design production ML systems
Design a feature store
Build a feature store