I use Python 3.12.1 and pandas 2.2.0.
I find df.plot(kind='bar')
and df.plot.bar()
work in a similar (or even the same?) way.
- 这两者有什么不同吗?
- 哪种方式是首选的?
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.plot.html
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.plot.bar.html