I have a dataframe with two columns: name and version.
I want to add a boolean in an extra column. So if the highest version then true, otherwise false.
import pandas as pd
data = [['a', 1], ['b', 2], ['a', 2], ['a', 2], ['b', 4]]
df = pd.DataFrame(data, columns = ['name', 'version'])
df
is it best to use groupby for this? I have tried smth. like this but I do not know how to add extra column with bolean.
df.groupby(['name']).max()