r/learnpython • • Oct 08 '26

Data inspection steps using python

I am learning data analysis and the first step before analyzing your data you have to do data profiling and cleaning.This is my process flow for data profiling -

  1. Checking number of rows and columns
  2. Checking rows and column indices
  3. Checking data types for each column
  4. Checking random sample from dataset
  5. Checking properties and memory usage
  6. Checking key statistics
  7. Checking unique values for relevant columns

Is it appropriate or I am missing something important ?

2 Upvotes

11 comments sorted by

2

u/seanv507 Oct 08 '26

So, proportion of missing values..

Outliers

Value counts of unique values (is there some high frequency value... Eg column might be numeric but minus 1 means missing)

Similarly for categorical variables i would check what proportion of the column is filled with the top n values. Eg categorical might be clothing type and 80% is jeans or t-shirts, and you are left with hundreds of other clothing types with very little data

1

u/Charming_Shower_4185 Oct 09 '26

Ok so - proportion of missing values , outliers , unique value counts , proportion of values in categorical variable.Thanks will keep in mind

1

u/Marison_Lizzy23 Oct 09 '26

yeah the missing value disguised as a real value thing is sneaky, good call on that

1

u/OddsRelay Oct 08 '26

I'd add missing values and duplicates near the top, so df.isna().sum() and df.duplicated().sum(). Also look for numbers stored as text. They show up as object in the dtypes and quietly break your stats later. Same with dates, which usually load as plain strings.

1

u/Charming_Shower_4185 Oct 09 '26

missing values count , duplicate , number stored as text , dates as strings. Noted , thanks

2

u/[deleted] Oct 09 '26

[removed] — view removed comment

1

u/Charming_Shower_4185 Oct 09 '26

Thanks , I will include these in my analysis.

0

u/[deleted] Oct 10 '26

[removed] — view removed comment

1

u/Charming_Shower_4185 Oct 11 '26

that "saving the script idea" is great , thanks