HTTP/2 200
date: Mon, 28 Jul 2025 00:19:06 GMT
content-type: text/html
content-encoding: gzip
last-modified: Mon, 07 Jul 2025 17:40:08 GMT
cf-cache-status: DYNAMIC
vary: accept-encoding
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=T3VlxMEZbVDJrFY%2BKd3vFmGdf3YiSuPubSG8AlmN1TZcagdBhIj%2FA2H5NSGpmoBkCPAJkZ5BM9yDpAbthAuHyBnhFHkA%2B8EhKPGP%2Bhrf8kPVE9N5F5OiIC%2BiBRjAkiwF%2Blqw"}],"group":"cf-nel","max_age":604800}
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
server: cloudflare
cf-ray: 966033fe0d71c1c7-BLR
server-timing: cfL4;desc="?proto=TCP&rtt=727&min_rtt=712&rtt_var=223&sent=7&recv=11&lost=0&retrans=0&sent_bytes=3386&recv_bytes=1024&delivery_rate=3588599&cwnd=252&unsent_bytes=0&cid=f47d423aff37ada6&ts=275&x=0"
pandas.DataFrame.ndim — pandas 2.3.1 documentation
Skip to main content
pandas.DataFrame.ndim
-
property DataFrame.ndim[source]
Return an int representing the number of axes / array dimensions.
Return 1 if Series. Otherwise return 2 if DataFrame.
See also
ndarray.ndim
Number of array dimensions.
Examples
>>> s = pd.Series({'a': 1, 'b': 2, 'c': 3})
>>> s.ndim
1
>>> df = pd.DataFrame({'col1': [1, 2], 'col2': [3, 4]})
>>> df.ndim
2