Use DataFrame.info() as a compact inspection step when cleaning imported data. It reports the index, columns, data types, null counts, and memory usage in one view. section 3.8 section 5.0
Inspect an imported DataFrame
After reading a CSV file, run df.info(show_counts=True) to inspect its structure and make the available-value counts explicit. Compare the reported dtypes with the types you expected from the imported columns. section 5.0 section 3.8
Read the output as a quick checklist:
- Check the columns and index to confirm that the imported object has the expected structure. section 3.8
- Check dtypes because pandas infers column types when reading CSV text and may choose int64, float64, or object. section 3.8
- Check null counts before deciding whether to remove missing rows or replace missing values. section 5.0 section 5.0
