What happens when you compare 2 pandas Series What happens when you compare 2 pandas Series python python

What happens when you compare 2 pandas Series


Bug or not. I would suggest to make a dataframe and compare the series inside the dataframe.

import pandas as pdx = pd.Series([1, 1, 1, 0, 0, 0], index=['a', 'b', 'c', 'd', 'e', 'f'], name='Value_x')y = pd.Series([0, 2, 0, 2, 0, 2], index=['c', 'f', 'a', 'e', 'b', 'd'], name='Value_y')df = pd.DataFrame({"Value_x":x, "Value_y":y})df['Value_x'] > df['Value_y']Out[3]:a     Trueb     Truec     Trued    Falsee    Falsef    Falsedtype: bool