Home > other >  Novice pyecharts mapping for help!!!!!!
Novice pyecharts mapping for help!!!!!!

Time:09-29

The from pyecharts import Bar
The import XLRD
The date=XLRD. Open_workbook (' data. XLSX)
Table.=the date sheets () [0]
Print (table. Nrows)
Print (table. Ncols)
Names=[]
The sales=[]
For I in range (1, table. Nrows) :
Name=table. Row_values (I) [0]
Names. Append (name)
Sale=table. Row_values (I) [2]
Sales. Append (sale)
Print (names)
Print (sales)
The bar=bar ()
Bar. Add_xaxis (names)
Bar. Add_yaxis (' business details table 'sales)
Bar. Render (' sales icon. HTML)

Results: E: \ python \ pythonw exe C:/Users/Administrator/Desktop/data. Py
Traceback (the most recent call last) :
The File "C:/Users/Administrator/Desktop/data. Py", line 4, the in & lt; module>
Bar ()
AttributeError: 'Bar' object has no attribute 'add_xaxis'

Pray god to help have a look at what's the problem

CodePudding user response:

Pyechart v0.5. Incompatibility between X and v1, this is the old version pyechart code, you put the new pyechart, copy to code

CodePudding user response:

Online tutorial on the copy, I remember when installing pyecharts0.5.11 if it shows failed...

CodePudding user response:

refer to the second floor yxc19929 response:
online tutorial on the copy, I remember when installing pyecharts0.5.11 if it shows failed...
high version can not directly back, should put high version uninstalled low version

CodePudding user response:

reference kohane Jary reply: 3/f
Quote: refer to the second floor yxc19929 response:

Online tutorial on the copy, I remember when installing pyecharts0.5.11 if it shows failed...
high version can not directly back, should put high version uninstalled low version
ok, I try, thank god
  • Related