Given the sample data:
obj = pd.Series([[0, 12], [4, 45], [6, 18]]) df = pd.DataFrame({\'A\':[0, 2, 3], \'B