Here are how the dataframes columns look like.
df1=\'device number\', \'date\', ....<<10 other columns>> 3500 records
df2=\'device number\', \'date\',
Only way I can see this happening... particularly with the 14,000 being the same exact number as the number of records in df2
is if the column combination in df2
are not unique.
You can verify that they are not unique with the following (True
if unique)
df2.duplicated(['device number', 'date']).sum() == 0
Or
df.set_index(['device number', 'date']).index.is_unique