pandas 的优势,再大、再复杂的表,一个“==”即可实现比较,非常方便!
In [40]: d1
Out[40]:
0 1 2 3 4 s
0 0.166063 0.643387 0.890301 0.960277 0.289727 year
1 0.678300 0.905569 0.806541 0.215528 0.084182 month
2 0.331135 0.062258 0.033360 0.430646 0.503744 week
3 0.146748 0.350210 0.677238 0.274610 0.931259 day
4 0.958250 0.254452 0.534802 0.067034 0.775763 hour
5 0.913580 0.884812 0.210083 0.310117 0.147286 minute
In [43]: d2
Out[43]:
0 1 2 3 4 s
0 0.166063 0.643387 0.890301 0.960277 0.289727 year
1 0.678300 0.905569 0.806541 0.215528 0.084182 month_dddd
2 0.331135 0.062258 0.033360 0.430646 0.503744 week
3 0.146748 0.350210 0.677238 0.274610 0.931259 day
4 0.958250 0.254452 0.534802 0.067034 0.775763
5 0.913580 0.884812 0.210083 0.310117 0.147286 000
In [50]: d2 == d1
Out[50]:
0 1 2 3 4 s
0 True True True True True True
1 True True True True True False
2 True True True True True True
3 True True True True True True
4 True True True True True False
5 True True True True True False