Advertisements
Advertisements
प्रश्न
Can you write a program to count the number of rows and columns in a DataFram?
कोड लेखन
Advertisements
उत्तर
import pandas as pd
df = pd.DataFrame()
rows, columns = df.shape
print("Number of rows:", rows)
print("Number of columns:", columns)
Explanation:
shape returns the number of rows and columns in a DataFrame.
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
