Skip to content
  • Tutorials
    • c programming
      • libraries
    • c++
    • Linux
    • Python
    • batch programming
    • Technology
  • IDE
  • Tools
python pandas shape 1

python pandas shape

May 14, 2022 by Anurag batra
>>> df = pd.DataFrame({'col1': [1, 2], 'col2': [3, 4]})
>>> df.shape
(2, 2)

Here is what the above code is Doing:
1. We create a DataFrame from a dictionary.
2. We call the shape method on the DataFrame.

The shape method returns a tuple of the form (rows, columns).

Categories Python Examples
Post navigation
how to send a message in a specific channel discord.py
how to write words on any other apps in python
© MyEduKit - 2022 . All Rights Reserved.