Python · Data preparation
Take a first look at your CSV
Inspect columns and missing-value counts with Python and pandas.
Try it in three steps
- Use a Python environment with pandas installed. Place a comma-separated veri.csv file in the working folder and run import pandas as pd.
- Load it with df = pd.read_csv("veri.csv"); inspect initial rows with print(df.head()) and column types and non-null counts with df.info().
- Run print(df.isna().sum()) to count recognized missing values per column. Compare the missing-value coding with your data dictionary.
How to read the output
For example, 2 for a column named yas means two observations were recognized as missing; it does not explain why.
Test your understanding.
True or false?
Counting missing values also explains why they are missing.
Related concepts
Official source
Python · Documentation ↗Documentation checked: . Steps are based on official documentation and have not been tested in the application. Menu names may differ by version and interface language.