Different number of characters in a left merge

https://www.codecademy.com/paths/data-science/tracks/data-processing-pandas/modules/dspath-multiple-tables-pandas/projects/multi-tables-proj

Hi, in this project we use a series of left merges to create a big dataframe called ‘all_data’.
When I use the len() function in the first dataframe that I merge (the ‘left’ one) it gives me a different number of characters than in the big dataframe. The first one gives me 2000 and the final big one gives me 2594. Shouldn´t it give me the same number?

Thanks and happy coding!

Hello @emigoti, and welcome to the Codecademy Forums!

Of the 2000 users who visited Cool T-Shirts Inc., many of them did not cart any items. However, others carted items 2, 3, or even 4 times. Each time a user carted, a new row containing their user_id was created in the 'cart.csv' file. Accordingly, some of the users are represented more than once in some of the files. With the left merges, each row in the left dataframe is represented in the result, with additional rows created for repeated occurrences of individual users in the right dataframe of the merge. As a result, we wind up with more than 2000 rows.

1 Like