I have a dataframe, example sample below:
import datetime
import pandas as pd
ids =[1, 2, 3, 1, 2, 3]
vals = [3, 5, 6, 3, 7, 8]
lats = [10, 10, 10, 30, 30, 30]
ratio = [.1, .4, .2, .3, .4, .5,]
df = pd.DataFrame({'ids' : ids, 'vals' : vals, 'lats' : lats, 'ratio' : ratio})
>>>df
ids vals lats ratio
0 1 3 10 0.1
1 2 5 10 0.4
2 3 6 10 0.2
3 1 3 30 0.3
4 2 7 30 0.4
5 3 8 30 0.5
I want to create a graph with lines that have ratio on the y-axis, lats on the x-axis and are grouped by the ids column. All the questions I've found use groupby or pivot on a dataframe that is used fully, and not a selection of columns.
I need to make more graphs on my true dataframe, which has many more columns and therefore would like to know how to plot this by selecting specified columns.
