Created
March 1, 2018 18:26
-
-
Save kindofluke/7a265a6171c23a6dd68e07154cc81c93 to your computer and use it in GitHub Desktop.
PieCufflinks
This file contains 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
import cufflinks as cf | |
# Correct datatypes cufflinks does not support CategoryType so we make them strings and rebuild the dataframe. | |
source_df = pd.DataFrame(source_counts).reset_index() | |
flavor_df = pd.DataFrame(flavor_counts).reset_index() | |
source_pie = source_df.iplot(kind='pie', labels='Source', values='FoodCode', colors=colors, title='Sources of Pie') | |
flavor_pie = source_df.iplot(kind='pie', labels='Source', values='FoodCode', colors=colors, title='Flavors of Pie') | |
display(source_pie, flavor_pie) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment