Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python dataframe shape

print(df.shape)
# (891, 12)

print(df.shape[0])
# 891

print(df.shape[1])
# 12
Comment

shape pandas

df.shape
Comment

python pandas shape

# The shape attribute returns a tuple (TODO appendix) where the first value is
#the number of rows and the second number is the number of columns
print(df.shape)
(1704, 6)
Comment

pandas shape

>>> df = pd.DataFrame({'col1': [1, 2], 'col2': [3, 4]})
>>> df.shape
(2, 2)
Comment

PREVIOUS NEXT
Code Example
Python :: python plot confidence interval 
Python :: pandas merge validate 
Python :: df add column from dict 
Python :: python shift array 
Python :: python object has no attribute 
Python :: return render django 
Python :: python vectorize 
Python :: how to add colors in python 
Python :: remove nan from list 
Python :: days calculator python 
Python :: download youtube video by python 
Python :: sort 2d list python 
Python :: whatsapp bot python code 
Python :: k fold cross validation 
Python :: add element to list python 
Python :: split long list into chunks of 100 
Python :: django class based views listview 
Python :: python re 
Python :: python fme logger 
Python :: list inside a list in python 
Python :: python conditional statement 
Python :: takes 2 positional arguments but 3 were given 
Python :: how to use multiple keys for single value in dictionary python 
Python :: Issue AttributeError: ‘numpy.ndarray’ object has no attribute ‘index’ 
Python :: fastest way to check odd or even in python 
Python :: python if elif else syntax 
Python :: using comma as the thousand separator 
Python :: Python match.re and match.string 
Python :: python check if variable has value 
Python :: label encoding of a column in python 
ADD CONTENT
Topic
Content
Source link
Name
3+8 =