pandas 读取列数以及获取真实df长度(df.dropna)不好使情况下
读取时,不读取第一列
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)
本文来自博客园,作者:CodeYaSuo,转载请注明原文链接:https://www.cnblogs.com/hany-postq473111315/p/15192469.html