A wrapper to introduce dplyr like syntax for data manipulation to pandas and polars.
Documentation here
Example notebook here
Goals:
- Symbolic names for columns
df | select(x, y)
- Detect collisions (e.g. 2 dataframes with the same name, 2 different columns with the same name)
- magittr like piping ability
df | filter(x > 0) >> select(x, y)
- dplyr verbs (mutate, select, filter, etc.)
df | mutate(z = x + y)
- A non-changing preview of the dataframe
df2 = df | head(5) | select(x, y)
will previewdf.head(5)
anddf2 = df | select(x, y)
-
select
-
filter
-
mutate
-
group_by
-
summarize
-
arrange
-
distinct
-
rename
-
count
-
head
-
tail
-
sample_n
-
join
- Windows functions? Over, lag, lead, etc.
- Initialize column names as variables
- Publish to PyPi
- Better documentation
- Add tests
- Add CI/CD
Generate docs:
python pdoc --html dpyr --force
Unit test:
python -m unittest