In [1]:
import pandas as pd
In [2]:
df_mix = pd.DataFrame({'col_int': [0, 1, 2], 'col_float': [0.1, 0.2, 0.3]}, index=['A', 'B', 'C'])
print(df_mix)
In [3]:
print(df_mix.dtypes)
In [4]:
print(df_mix.loc['B'])
In [5]:
print(type(df_mix.loc['B']))
In [6]:
print(df_mix.loc['B']['col_int'])
In [7]:
print(type(df_mix.loc['B']['col_int']))
In [8]:
print(df_mix.at['B', 'col_int'])
In [9]:
print(type(df_mix.at['B', 'col_int']))
In [10]:
print(df_mix.loc[['B']])
In [11]:
print(type(df_mix.loc[['B']]))
In [12]:
print(df_mix.loc[['B']].dtypes)