How it works...
Each Series was created with the class constructor which accepts a wide variety of inputs with the simplest being a sequence of values for each of the parameters index and data.
Mathematical Cartesian products are slightly different from the outcome of operating on two pandas objects. Each a label in s1 pairs up with each a label in s2. This pairing produces six a labels, three b labels, and one c label in the resulting Series. A Cartesian product happens between all identical index labels.
As the element with label c is unique to Series s2, pandas defaults its value to missing, as there is no label for it to align to in s1. Pandas defaults to a missing value whenever an index label is unique to one object. This has the unfortunate ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access