Advertisement
makispaiktis

Kaggle - Exercise 6 - Set style to lineplot

Jul 2nd, 2023
1,045
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.47 KB | None | 0 0
  1. import pandas as pd
  2. pd.plotting.register_matplotlib_converters()
  3. import matplotlib.pyplot as plt
  4. # %matplotlib inline
  5. import seaborn as sns
  6.  
  7.  
  8. # 1. Read the dataset
  9. spotify_filepath = "../input/spotify.csv"
  10. spotify_data = pd.read_csv(spotify_filepath, index_col="Date", parse_dates=True)
  11.  
  12. # 2. Set the desired style. Choices are: "white", "whitegrid", "dark", "darkgrid", "ticks"
  13. sns.set_style("darkgrid")
  14. plt.figure(figsize=(12,6))
  15. sns.lineplot(data=spotify_data)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement