markfairbanks / tidypolars

Tidy interface to polars
http://tidypolars.readthedocs.io
MIT License
324 stars 10 forks source link

Rename `.outer_join()` to `.full_join()` #111

Closed markfairbanks closed 2 years ago

mjkarlsen commented 2 years ago

The full_join test is failing and I can't really figure out why. One thing is that it looks like polars.join(how = 'outer') reorganizes the columns and moves the on column next to the joined data frame. I would expect no movement of the columns. Do you think it's worth submitting an issue to polars?

import polars as pl
df1 = pl.DataFrame({'x' : ['a', 'a', 'b'], 'y' : range(3)})
df2 = pl.DataFrame({'x' : ['a'], 'z' : range(1)})

#Actual
print(df1.join(df2, on='x', how = 'outer'))
# Expected
print(pl.DataFrame({'x' : ['a', 'a', 'b'], 'y' : [0, 1, 2], 'z' : [0,0,None]}))