From Messy CSV to Business Insights: A Practical Data Science Workflow with Python
Learn how real data science starts before machine learning. Work with a messy sales dataset in Python, clean missing and inconsistent values, explore patterns with pandas, visualize business trends, and turn raw CSV data into practical recommendations.
Prerequisites: Basic Python, variables, lists, dictionaries, functions, and basic familiarity with CSV files.
Python Data Science Project: From Messy CSV to Business Insights | Karyvio
From Messy CSV to Business Insights: A Practical Data Science Workflow with Python
A lot of beginners think data science starts with machine learning.
It usually doesn't.
It starts with a messy dataset.
You receive a CSV containing:
missing values
inconsistent categories
duplicate records
incorrect data types
strange dates
numbers stored as text
columns you don't actually need
And someone asks:
"What can we learn from this data?"
That's the real beginning of a data science workflow.
In this tutorial, we'll take a small sales dataset and turn it into useful business insights using Python.
We'll use:
pandas for data manipulation
NumPy for numerical operations
Matplotlib for visualization
Python for analysis
We won't train a machine-learning model.
Instead, we'll focus on something every data scientist needs to know first:
understanding the data well enough to make a useful decision.
The project we're building
Imagine a company gives you a file called:
text
sales_data.csv
It contains sales transactions from several regions.
The business wants answers to questions such as:
text
Which products generate the most revenue?
Which regions perform best?
Are sales increasing over time?
Which products have weak performance?
Are there unusual transactions?
What should the business investigate next?
Real datasets are rarely as clean as tutorial datasets.
7. Missing values require decisions
Don't automatically do this:
python
df = df.dropna()
Removing every incomplete row might throw away useful information.
Instead, ask:
text
Why is the value missing?
How many values are missing?
Is the missingness important?
Can the value be recovered?
Should the row be removed?
Should the value be replaced?
For example, if only three unit prices are missing, you might investigate those rows:
python
df[df["unit_price"].isna()]
Then decide what makes sense for the dataset.
Data cleaning is not just a coding operation.
It's a reasoning problem.
8. Find duplicate records
Duplicates can distort your analysis.
Check:
python
df.duplicated().sum()
If the result is:
text
12
you have twelve duplicate rows.
Inspect them:
python
df[df.duplicated()]
If they are confirmed duplicate transactions, remove them:
python
df = df.drop_duplicates()
But again:
Don't delete duplicates blindly.
Two identical-looking rows might represent two legitimate transactions.
Understand the business meaning before removing them.
orders units revenue average_order_value
West 850 2100 910000 1070
East 920 2400 760000 826
South 700 1900 640000 914
North 530 1500 530000 1000
This is far more informative than:
text
West = highest revenue
because you can investigate why.
26. The difference between analysis and insight
This is an important distinction.
Analysis
text
West generated $910,000.
Insight
text
West generated the highest revenue despite
having fewer orders than East, suggesting its
average order value is significantly higher.
Recommendation
text
Investigate the product mix and customer segments
driving West's higher order value before expanding
the same strategy to other regions.
That's the progression:
text
Data
↓
Analysis
↓
Insight
↓
Decision
This is where data science becomes valuable to a business.
27. Don't confuse correlation with causation
Suppose you discover:
text
Higher advertising spend
↓
Higher revenue
It is tempting to say:
"Advertising caused the revenue increase."
But your dataset may not prove that.
Maybe:
text
Holiday season
↓
More advertising
+
More customers
↓
Higher revenue
Or:
text
New product launch
↓
More advertising
↓
Higher revenue
Correlation can reveal something worth investigating.
It doesn't automatically prove causation.
28. Data science before machine learning
This project is deliberately not using a machine-learning model.
That's important.
A typical workflow might look like:
text
Business question
↓
Collect data
↓
Clean data
↓
Explore data
↓
Visualize
↓
Find patterns
↓
Create features
↓
Decide whether ML is useful
↓
Build model if necessary
Machine learning comes later when the problem actually benefits from prediction, classification, clustering, or another modeling approach.
scikit-learn currently provides tools for classification, regression, clustering, preprocessing, dimensionality reduction, and model selection, which are useful once an analysis problem has progressed into predictive modeling.
Now your analysis is becoming reusable code rather than a collection of notebook cells.
31. Export the results
You may want to give the results to someone who doesn't use Python.
Save the summary:
python
region_summary.to_csv(
"region_summary.csv"
)
Save product results:
python
product_revenue.to_csv(
"product_revenue.csv"
)
Now your project produces actual data artifacts.
32. Build a simple data-science report
A professional analysis doesn't have to be a massive dashboard.
A useful report can contain:
text
Sales Analysis
───────────────
Total Revenue
$2.84M
Top Region
West
Top Revenue Product
Laptop
Highest Average Order Value
West
Major Observation
West produces the highest revenue
despite having fewer orders than East.
Recommended Next Step
Investigate West's product mix and
customer segments.
This is much closer to how data analysis is communicated in real organizations.
33. What makes this a data science project?
Because you're combining several activities:
text
Python
+
Data cleaning
+
Exploratory analysis
+
Statistics
+
Visualization
+
Feature creation
+
Business reasoning
Data science isn't just:
text
Python + machine learning
It is a broader workflow for extracting useful information from data.
34. A stronger portfolio version
If you're building this for your GitHub portfolio, don't stop with one CSV.
Take the same workflow and build a Tech Jobs Data Analysis project.
Use a dataset containing fields such as:
text
job_title
company
location
experience
salary
remote_type
skills
posted_date
Then answer:
text
Which skills appear most frequently?
Which roles offer the highest salaries?
Which locations have the most openings?
How common are remote jobs?
Which technologies appear together?
Does experience level correlate with salary?
Which roles are growing over time?
Now the project becomes directly relevant to a technology-career platform.
Your final workflow could be:
text
Job data
↓
Clean
↓
Analyze
↓
Visualize
↓
Technology trends
↓
Career insights
That is exactly the kind of Karyvio-specific value we should build into future Data Science content.
Final takeaway
Data science isn't about making the biggest model.
It starts with asking a good question.
Then:
text
Get the data
↓
Understand the data
↓
Clean the data
↓
Explore the data
↓
Visualize the data
↓
Find meaningful patterns
↓
Explain what they mean
↓
Recommend an action
Only after that should you ask:
"Would machine learning make this better?"
Sometimes the answer is yes.
Sometimes the best solution is a simple pandas analysis.
And knowing the difference is one of the most valuable skills you can develop as a data scientist.
Build this yourself
For your first Data Science portfolio project, aim for this final result:
text
CSV Dataset
│
▼
Python + pandas
│
├── Data cleaning
├── Exploratory analysis
├── Business metrics
├── Visualizations
└── Findings
│
▼
Final Report
│
▼
GitHub Portfolio
Don't write:
"I analyzed a dataset."
Show:
"I investigated a business question, cleaned imperfect data, identified measurable patterns, visualized the evidence, and turned those findings into recommendations."
Build your first machine learning project with Python by turning a small dataset into a working prediction model, from data preparation and feature selection to training, evaluation, and saving the model.
Build a practical semantic search system with Python and Sentence Transformers. Learn how text becomes embeddings, compare queries with documents, rank results by similarity, and turn the prototype into a reusable search component.
AI is reshaping fresher hiring in India in 2026. Explore the skills employers increasingly value, emerging AI roles, hiring trends, and what students can learn to stay career-ready.
AI coding agents can now do much more than autocomplete code. Learn how to use them for planning, implementation, testing, debugging, and code review while keeping developers in control of quality and security.
Comments (0)
Be the first to share your thoughts.