text_html_output_1.png
from pandasql import sqldf

import plotly.express as px

species = sqldf('SELECT species, COUNT(species) AS size FROM df_villagers GROUP BY species ORDER BY size DESC')
pie = px.pie(species, values='size', names='species', title='Villager Species', color_discrete_sequence=px.colors.qualitative.Dark24)
pie.show()
barh = px.bar(species, x='size', y='species', orientation='h', color='size', title='Villager Species')
barh.update_layout(autosize=False, height=800)
barh.show()