### Pandas: why doesn’t dot product work even after choosing the correct number of columns?

I’m trying to take the dot product of a pandas DataFrame and Series. However, even when I restrict the pandas DataFrame to have the same number of columns as the Series, I still get ValueError: matrices are not aligned. import pandas as pd df1 = pd.DataFrame([[0, 1, -2, -1], [1, 1, 1, 1]]) df2 =…

Details