Bokeh help - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: Bokeh help (/thread-37847.html) |
Bokeh help - tangetjay - Jul-28-2022 Im trying to figure out how to make a graph with these modifications : Create the following visualization (i.e. scatterplot) that shows the relationship between the total vaccinations (x axis) and people fully vaccinated (y axis) for the states of California, Colorado, and Texas. I don’t know how to single out the three states from the rest. I tried this cal = df[df[ 'location' ] = = 'California' ] cool = df[df[ 'location' ] = = 'Colorado' ] tx = df[df[ 'location' ] = = 'Texas' ], but my code will not work. It’s a csv file with all the states from USA COVID-19 Vaccinations | Kaggle I just started with bokeh, jyputer and thonny this week, so all of this is very new to me. This is my attempt. import bokeh import pandas as pd from bokeh.plotting import figure from bokeh.io import output_notebook, show output_notebook() df=pd.read_csv ('us.csv') print(df) # not working df['total_vaccinations']= pd.to_daytime(df['total_vaccinations']) #total_vaccinations x red bold #people_fully_vaccinated y black #filter data #location #California red #Colorado green #Texas blue # (3) Include a ‘grey’ border around the visualization with line width of 8 and alpha value of 0.8 cal=df[df['location']=='California'] cool=df[df['location']=='Colorado'] tx=df[df['location']=='Texas'] |