Comments (8)
Duplicated issue. I teach a python class and was also able to get 17 more accounts of this issue.
from seaborn-data.
Actually, nevermind, I had an idea and I believe I've fixed this going forward. Hope that solves your problems and sorry for the trouble.
from seaborn-data.
It looks solved! Thanks for your attention!
from seaborn-data.
Those are both old versions of seaborn. I cannot replicate on the current version.
from seaborn-data.
Issue happens in Anaconda actually. I think the latest version is 0.12.2 in conda. Are there any plan to update version in conda?
from seaborn-data.
That's not something I have any control over.
from seaborn-data.
@connorfryar I suggest you to use !pip install seaborn --upgrade
command on Colab and force the seaborn update. I think it solves the problem.
@mwaskom You were right, the problem occurs in old versions. Do you have any suggestions except update? Because our students are new, they use Anaconda and I am not sure they can handle the update with pip thing.
from seaborn-data.
It looks like GitHub changed something about the html it returns from the repository homepage and the list of files can no longer be parsed from it. That breaks get_dataset_names
on < v0.13 (fortunately, the approach that we used to enumerate the valid dataset names changed for unrelated reasons prior to the v0.13 release, which is why it works fine on the latest version). If you look at the source for load_dataset
, it has:
if cache:
cache_path = os.path.join(get_data_home(data_home), os.path.basename(url))
if not os.path.exists(cache_path):
if name not in get_dataset_names():
raise ValueError(f"'{name}' is not one of the example datasets.")
urlretrieve(url, cache_path)
full_path = cache_path
else:
full_path = url
So get_dataset_names
only runs when you are trying to load from the cache and the dataset is not previously cached. A little weird, but I think it suggests a few workarounds:
- Do a one-time setup where you cache all the datasets and then use
load_dataset
as normal - Use
cache=False
, e.g.load_dataset("tips", cache=False)
every time you want to load data - Change your instructional materials to use
pd.read_csv
and point at a path. The raw url on this repo can still work; e.g.pd.read_csv("https://raw.githubusercontent.com/mwaskom/seaborn-data/master/tips.csv")
, or you could clone the repo and distribute the datasets to your students so that they have them locally.
Depending on your teaching setup (1) is probably the easiest because it's a one-time thing and then all commands should work as expected. (Although if you're using Colab, I don't know how persistent the cache will be; it may not work there). It could look as simple as doing (in a Jupyter notebook):
cache_dir = sns.get_data_home()
!git clone https://github.com/mwaskom/seaborn-data.git $cache_dir
But if students don't have git installed, that won't work; you'll want to cook up a simple script that enumerates the datasets you want and does pd.read_csv(web_path).to_csv(f"{data_home}/{name}.csv"
from seaborn-data.
Related Issues (12)
- USA births dataset? HOT 3
- Seaborn pairplot supresses error messages (correlations with NaN/inf values) HOT 1
- License file needed
- Publish on GitHub pages? HOT 5
- Load_dataset is not working for me. getting the below error. HOT 1
- load_dataset is not working, getting the below error, please assist. HOT 4
- Dataset descriptions. HOT 2
- URL error HOT 1
- I cannot use the datasets in seaborn HOT 1
- SSL: CERTIFICATE_VERIFY_FAILED HOT 2
- Can't access to dataset. HOT 1
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 seaborn-data.