读取时,不读取第一列 data = pd.read_csv('data.csv',index_col=0)
df_length = 0 for i in df['列名'].values: if i is not np.nan: df_length += 1 print(df_length)