# import pandas library
import pandas as pd
from pyparsing import line
import seaborn as sns
import matplotlib.pyplot as plt
# create pandas DataFrame
df = pd.DataFrame({'team': ['India', 'South Africa', 'New Zealand', 'England'],
'points': [10, 8, 3, 5],
'runrate': [0.5, 1.4, 2, -0.6],
'wins': [5, 4, 2, 2]})
# plot the data frame
line_plt = sns.lineplot(data = df)
line_plt.set(title = "ICC World Cup Standings")
plt.show()
# plot the data
lineplt = sns.lineplot(x= 'column_x', y="column_y", data=dataframe)
# Creating seaborn Title
lineplt.set(title = 'Your Title')
plt.show()
Add overall title to seaborn using suptitle() method
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
# create pandas DataFrame
df = pd.DataFrame({'wins': [12, 11, 10, 3, 11, 20, 2, 30, 12,7],
'lost': [6, 4, 5, 3, 10, 7, 2, 12, 0, 6],
'team': ['A', 'A', 'A', 'A', 'A', 'B', 'B', 'B', 'B', 'B']})
# plot the data frame
rel = sns.relplot(data=df, x='wins', y='lost', col='team')
# add overall title
rel.fig.suptitle('ICC World Cup Standings')
plt.show()