Having issues to render a grouped bar chart for Blood Pressure Values

Thank you both!! I found the issue, it had to do with the dataframe data types itself. The sys and dias values were not converted to numeric. Once I did the following the chart is showing up as expected now in both Plost and Altair:

All I had to do was this:

new_bp_df.sys = pd.to_numeric(new_bp_df.sys)
new_bp_df.dias = pd.to_numeric(new_bp_df.dias)

Thank you a lot again! Checking your samples pointed me in the right direction to start checking the actual dataframe types, since running your examples directly was working correctly. So the issue must have been somewhere else, and indeed it was. Thanks again for spending time helping this streamlit/pandas newbie!

1 Like