用equals
成员函数即可。
import pandas as pd
= pd.DataFrame({'a': [1, 2, 3], 'b': [4, 5, 6]})
a = pd.DataFrame({'a': [1, 2, 3], 'b': [4, 5, 6]})
b a.equals(b)
True
官方文档:https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.equals.html
用equals
成员函数即可。
import pandas as pd
a = pd.DataFrame({'a': [1, 2, 3], 'b': [4, 5, 6]})
b = pd.DataFrame({'a': [1, 2, 3], 'b': [4, 5, 6]})
a.equals(b)
True
官方文档:https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.equals.html
Except as otherwise noted, this blog is licensed under CC BY-SA 4.0 License.
©2021-
searchstar
|
pv
|
uv
Theme Tree
by Wu Jun
Powered by Hexo