seaborn factor plot: Plotting columns with lists instead of values

907
March 23, 2017, at 01:30 AM

I have created a dataframe as follows

As you can see, some columns (mean_fit_time, mean_score, mean_score_time) have lists instead of values. Now I would like to make a boxplot of the mean fit time for each estimator. If the table is organized in a long format (individual values instead of list), I can do it with a seaborn boxplot as follows

seaborn.boxplot(x='name', y='mean_fit_time', data=dataframe)

However, in this case, I get the following error

ValueError: Neither the `x` nor `y` variable appears to be numeric.

Do I have to explode the dataframe so that there is only one value in each cell or is there any other efficient method for handling this?

Note: BTW, Can someone tell me how I can share a dataframe in stackoverflow so that it is reproducible by others.

Thanks

Rent Charter Buses Company
READ ALSO
Update/Add Json file Key value pair without updating the file

Update/Add Json file Key value pair without updating the file

I have a file with JSON content as shown above,I wanted to add/override the Key-value pair in this file without touching the existing lines in the fileReason being when I upload the file to git it shows me the entire file has been changed and not just the updated...

488
Parsing a C++ header file with Python and extracting the enums

Parsing a C++ header file with Python and extracting the enums

I would like to extract the enum declarations from a C++ header file with a Python scriptI have surveyed examples using the libclang Python bindings and the pycparser module, plus I’ve looked into the ever-present Quixotic “do it with regular expressions”...

629
How can use gdata with python3

How can use gdata with python3

I am trying to use google contacts with python3 in the information about gdata recommend use the new library google-api-python-client (https://githubcom/google/google-api-python-client) but I can't figure out how get the contacts with this library

460
Google foobar minion labor shifts challange

Google foobar minion labor shifts challange

I have a Google foobar challenge:

1248