问题
I would appreciate if you could let me know how to plot some informative charts for the table provided here.
For example, I need a bar chart for the column named "Domestic unlisted companies:Use of IFRSs by unlisted companies" which shows in how many jurisdictions IFRSs is permitted, not permitted and so on. Or, a bar chart for the "Audit report states compliance with IFRS" column.
Besides, I need a pie chart for the column with the title "Domestic listed companies" which shows in how many jurisdictions IFRSs is permitted, not permitted and so on.
tables = pd.read_html('https://www.iasplus.com/en/resources/ifrs-topics/use-of-ifrs', header = None)
df = tables[2]
df.columns = df.columns.get_level_values(0) + ":" + df.columns.get_level_values(1)
sns.countplot( "Domestic unlisted companies:Use of IFRSs by unlisted companies", data=df)
Could you please let me know how to resolve this error?
File "D:/mifs-master_2/MU/learning-from-imbalanced-classes-master/learning-from-imbalanced-classes-master/continuous/Final Logit/SMOTENC/logit-smotency - Copy (2).py", line 37, in <module>
df.columns = df.columns.get_level_values(0) + ":" + df.columns.get_level_values(1)
File "C:\Users\Markazi.co\Anaconda3\lib\site-packages\pandas\core\indexes\base.py", line 3968, in _evaluate_numeric_binop
other = self._validate_for_numeric_binop(other, op, opstr)
File "C:\Users\Markazi.co\Anaconda3\lib\site-packages\pandas\core\indexes\base.py", line 3958, in _validate_for_numeric_binop
raise TypeError("can only perform ops with scalar values")
TypeError: can only perform ops with scalar values
Thanks in advance.
来源:https://stackoverflow.com/questions/55035784/typeerror-can-only-perform-ops-with-scalar-values