Polars issue
My goals
Create the ultimate bridge between the powerful performance of Polars and the intuitive, user-friendly API of Pandas.
My QA to chatgpt o1
Question
polars to pandas style, create a DataFrame, must use df.loc[], not df.loc()
df = DataFrame(
{"ref": list('abcd'), 'x': [1,2,3,4], 'z': [7,8,9,6]},
index=list('cfgh')
)
pass test
df.loc[df.ref == 'c']
df.loc[df.ref.eq('c')]
df.loc[(df.ref == 'c') & (df.x > 1)]
df.loc[(df.ref == 'c') | (df.x > 1)]
df.loc[df.ref.isin(['a','b'])]
df.loc[df.x.between(2,4)]
df.loc['c']
df.loc[:, 'x']
df.loc[:, ['x', 'z']]
df.loc[:, 'x':'z']
df.loc['c'][1]