pandas and NumPy 3 · NumPy

Reshape an array

Change the shape without changing the data. -1 lets NumPy work out the size.

a.reshape(2, -1)

Official pandas and NumPy 3 documentation

More numpy commands

All numpy commands · pandas and NumPy 3 cheatsheet

Was this page helpful?