The type and number of data columns view Pandas

The type and number of data columns view Pandas

Read data

import pandas as pd
import numpy as np
filepath = 'your_file_path.csv'
data = pd.read_csv(filepath)

See column value type and number

data['unit name'].value_counts()

If the number of columns and rows exceeds the screen display, set display.max_rows

If the number of columns in the column than the screen display, set display.max_columns

Set the display 20 lines

pd.set_option('display.max_rows',20)

References:

Sets the maximum number of lines and the maximum number of columns

Guess you like

Origin www.cnblogs.com/zhichun/p/11957062.html