Last active
May 29, 2020 15:17
-
-
Save Adityanagraj/120e5a34d532d9501965f4b59ce0abf0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#importing all necessary requirements | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
from pywaffle import Waffle | |
#creation of a dataframe | |
data={'phone': ['Xiaomi', 'Samsung', 'Apple','Nokia','Realme'], | |
'stock': [44,12,8,5,3] | |
} | |
df=pd.DataFrame(data) | |
#To plot the waffle Chart | |
fig = plt.figure( | |
FigureClass=Waffle, | |
rows=5, | |
values=df.stock, | |
labels=list(df.phone) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment