[Solved] Pandas rename Error: ValueError: operands could not be broadcast together with shapes (1,2) (3,) (1,2)

Pandas rename reported an error valueerror

error message

ValueError: operands could not be broadcast together with shapes (1,2) (3,) (1,2) 

Solution:

The initial investigation is that the pandas version is low, and the pandas version needs to be updated.初步排查是pandas版本较低导致,需要更新pandas版本。

Reference version

Current version: Pandas 1.1.3 updated version: Pandas 1.4.1

Read More: