Please note, this is a STATIC archive of website www.w3resource.com from 19 Jul 2022, cach3.com does not collect or store any user information, there is no "phishing" involved.

Examples

In [1]:
import numpy as np
import pandas as pd
In [2]:
df = pd.DataFrame([[2, 2.5]], columns=['int', 'float'])
row = next(df.iterrows())[1]
row
Out[2]:
int      2.0
float    2.5
Name: 0, dtype: float64

Pandas: DataFrame - iterrows.

In [3]:
row['int'].dtype
Out[3]:
dtype('float64')

Pandas: DataFrame - iterrows float64.

In [4]:
df['int'].dtype
Out[4]:
dtype('int64')

Pandas: DataFrame - iterrows int64.