-
-
Notifications
You must be signed in to change notification settings - Fork 19.1k
Closed as not planned
Closed as not planned
Copy link
Labels
Closing CandidateMay be closeable, needs more eyeballsMay be closeable, needs more eyeballs
Description
My goals
Create the ultimate bridge between the powerful performance of Polars and the intuitive, user-friendly API of Pandas.
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]
Metadata
Metadata
Assignees
Labels
Closing CandidateMay be closeable, needs more eyeballsMay be closeable, needs more eyeballs