Skip to content

BUG: Outer join on multiple date time columns results in nan keys #14033

Closed
@nosniborj

Description

@nosniborj

I have tried to reduce this problem as small as possible, two data frames attached each with 291 rows.

pickles.zip

df1 = pd.read_pickle('df1.pkl')
df2 = pd.read_pickle('df2.pkl')

merged = df1.merge(df2, how='outer', on=['DateTime', 'valid_datetime'])
#this results in nan values on the join keys
merged.shape[0] == merged[['DateTime', 'valid_datetime']].dropna().shape[0]

Note that if the DateTime and valid_datetime columns are converted to strings then this works fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions