Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'DataFrame' object has no attribute 'iplot'

Can I solve the following error: 'DataFrame' object has no attribute 'iplot'? I have to create box plot of every Category of my dataset imported form a csv file with pd.read_csv:

dataset = pd.read_csv(myfile)
dataset[columns].iplot(kind='box')
like image 701
willie Avatar asked Sep 01 '25 02:09

willie


1 Answers

The pandas dataframe object does not have the iplot method when it isn't linked to plotly. We need cufflinks to link pandas to plotly and add the iplot method:

import cufflinks as cf
cf.go_offline()
cf.set_config_file(offline=False, world_readable=True)

After this, try plotting directly from the dataframe:

dataset["columns"].iplot(kind="box")

Install cufflinks with : pip install cufflinks --upgrade)

like image 151
DapperDuck Avatar answered Sep 02 '25 15:09

DapperDuck