Pandas DataFrame property: ndim
DataFrame - ndim property
The ndim property is used to get an int representing the number of axes / array dimensions.
Return 1 if Series. Otherwise return 2 if DataFrame.
Syntax:
DataFrame.ndim
Example:
Download the Pandas DataFrame Notebooks from here.
Previous: DataFrame - axes property
Next: DataFrame - size property
It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.
https://w3resource.com/pandas/dataframe/dataframe-ndim.php
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics