Comments (10)
Hi Brandon and Young, I would like to work on this issue, if no one else is already working on it.
from dataprep.
Date: Jul 6, 2020
I am experiencing a similar problem in gcolab.
Versions
bokeh 2.1.1
dataprep 0.2.8
tornado 6.0.4
MWE:
!pip install -U tornado
!pip install dataprep
import time,os,json
import numpy as np
import pandas as pd
import seaborn as sns
import dataprep.eda as de
import bokeh.io
bokeh.io.output_notebook()
df = sns.load_dataset('titanic')
de.plot(df) # this gives nothing, does not give error but does not give any outputs.
# another attempt
from dataprep.eda import plot
plot(df) # gives no output
from dataprep.
After a lot of hacking (reading) into the code. Here's how to display plot in Colab.
def _report_repr_html_(self):
from bokeh.io.notebook import load_notebook
from bokeh.embed.notebook import notebook_content
load_notebook(hide_banner=True)
(script, div, cell_doc) = notebook_content(self.to_render)
return f'{div}<script>{script}</script>'
from dataprep.eda.report import Report
Report._repr_html_ = _report_repr_html_
Now your minimal example plot(df)
should work.
from dataprep.
It seems that the issue was fixed in bokeh-2.1. I cannot test it since dataprep 0.2.6 has requirement bokeh<2.1,>=2.0, which is incompatible with bokeh 2.1.1. @dovahcrow @brandonlockhart
from dataprep.
Thank you!! No worries. We will do extensive testing. :)
from dataprep.
This issue has been raised again today in a comment on our blog post. I'm getting this error on Colab:
from dataprep.
Hi Brandon and Young, for the clearing the cache issue for the plot(df), it looks like it is a CORS issue that specific to Bokeh running on Chrome (bokeh/bokeh#9773).
The plot(df) function worked well in the local Jupyter notebook using Safari. However the google colab error still exists in Safari.
For NON-dataprep bokeh gridplots were again not being display in Chrome (it threw the CORS policy error again unless you clear the cache), when I changed the browser to safari it worked again.
Slightly modified code for Safari:
from dataprep.
@peterirani and I are getting an error in Colab with dataprep version 0.2.7. Code to reproduce:
# install
!pip install dataprep
pip install -U ipykernel
from dataprep.eda import plot
import seaborn as sbn
df = sbn.load_dataset('iris')
plot(df)
Error from the console output:
Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing
@dovahcrow
from dataprep.
Thank you @korakot !! Would you like to submit a PR? We can put it in the next release cycle (in ~10 days).
from dataprep.
@jnwang I use Colab exclusively. So, I cannot test with other environment. Hope the minimal change doesn't impact other code.
Here's my PR
from dataprep.
Related Issues (20)
- Future Warning: Meta is not valid
- Make the documentation more lightweight and readable HOT 3
- EDA plot() not showing properly in VScode HOT 2
- Need data-type for each column in create_report function. HOT 2
- Add the option to pass a target varaible when creating the EDA report
- Latest dataprep versions seem to give incompatible requirements to pip-compile HOT 1
- Bonaire not possible to validate
- Support for pandas v2 HOT 3
- dataprep won't pip install under Python 3.11 due to wordcloud HOT 1
- How to Support Arrow Dataframe or Duckdb in EDA.
- create_report crashes for almost empty string columns HOT 1
- replacing np.int and similar aliases to support latest np versions HOT 1
- Only supported for TrueType fonts
- Date Cleaning (clean_date) falied to clean dates with 'August' HOT 1
- Seperate out clean so it doesn't rely on pandas/dask
- Export to HTML not working
- It appears Keyerror when I use the Dataprep module HOT 1
- cannot import name 'soft_unicode' from 'markupsafe'
- pip installation failed HOT 1
- can I get the data in the plot directly HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dataprep.