O'Reilly logo

Learning pandas - Second Edition by Michael Heydt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Understanding the default semantics of concatenation

Concatenation is performed using the pandas function pd.concat(). The general syntax to concatenate data is to pass a list of objects to be concatenated. The following demonstrates a simple concatenation of two Series objects, s1 and s2:

This concatenated the index labels and values of s2 to the end of those from s1. This resulted in duplicate index labels, as alignment is not performed during ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required