1
votes

I'm trying to visualize some data with a seaborn plot and the csv file link keeps returning the error '"link.csv" is not one of the example datasets.' What am I doing wrong?

import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt

df = sns.load_dataset('https://github.com/avocami/Goodreads-project/blob/main/df_goodreads.csv')

sns.jointplot(x=df["avg_rating"], y=df["num_pages"], kind='hex', marginal_kws=dict(bins=30, fill=True))

plt.show()

1

1 Answers

1
votes

Seaborn load_dataset() function is used to load an example dataset from Seaborn library. It is not used to load just any data, just the data specified in their documentation (specifically data that can be found in https://github.com/mwaskom/seaborn-data).

If you want to load your own data, use pandas read_csv() function:

import pandas as pd
df = pd.read_csv('https://github.com/avocami/Goodreads-project/blob/main/df_goodreads.csv')