Custom row indexing in DataFrames

Hey everybody :slight_smile:

Given a DataFrame df with columns I, A and C. Is there an way to set I as row index such that I can use df[i,:]or df[i,a] with i in I and a in A.

No, that is not possible in DataFrames.

You can do groupby(df, :I) or groupby(df, [:I, :A]) and index this object, but when indexed it will return a SubDataFrame not a single row.

1 Like

Is that something what we need?