示例数据帧
df
定义如下:
import numpy as np
import pandas as pd
df = pd.DataFrame(10*(2+np.random.randn(500, 8)), columns=list('ABCDEFGH'))
1
休息时
nan
测向
看起来像
df.head()
A B C D E F G H
0 6.598436 44.318800 18.064752 13.418329 17.145434 6.696975 14.757765 8.797826
1 3.593140 14.571717 16.292330 28.390669 35.289606 -4.273124 20.519388 25.137833
2 36.777253 34.360523 28.020462 15.356690 22.038938 14.960303 15.225555 34.691981
3 18.623122 27.184421 -5.320215 31.694895 21.156375 9.947077 20.257575 21.035659
4 11.864725 30.458160 13.509029 27.037195 20.581043 25.371691 1.094735 28.703618
df_output.head()
A B C D E F G H
0 nan 1 1 1 1 nan 1 nan
1 nan nan 1 1 1 nan 1 1
2 1 1 1 nan 1 nan nan 1
3 nan 1 nan 1 1 nan 1 1
4 nan 1 nan 1 1 1 nan 1