Assume you have the Pandas DataFrame data, with the followingcontents:
our_columns_name column_A column_B column_C column_Dcolumn_E
our_index_name                                                  Â
row_name_0              9       93       71   Hello      102
row_name_1             28       64       37      my       92
row_name_2             13       91       93    name      104
row_name_3             45       29       54      is       74
row_name_4              0       36       31   Jason       36
Each column has a dtype (data type). Which of the followingcould be set of dtypes for this DataFrame?
Hint 1: None of the numeric values shows a decimal point. (Afloat shows a decimal point, while an int does not. For example, 3.is a float, while 3 is an int.)
Hint 2: A column that has strings has a dtype of object, notstr.
You can create the DataFrame above with this code:
data = pd.DataFrame({'column_A': {'row_name_0': 9,
'row_name_1': 28,
'row_name_2': 13,
'row_name_3': 45,
'row_name_4': 0},
'column_B': {'row_name_0': 93,
'row_name_1': 64,
'row_name_2': 91,
'row_name_3': 29,
'row_name_4': 36},
'column_C': {'row_name_0': 71,
'row_name_1': 37,
'row_name_2': 93,
'row_name_3': 54,
'row_name_4': 31},
'column_D': {'row_name_0': 'Hello',
'row_name_1': 'my',
'row_name_2': 'name',
'row_name_3': 'is',
'row_name_4': 'Jason'},
'column_E': {'row_name_0': 102,
'row_name_1': 92,
'row_name_2': 104,
'row_name_3': 74,
'row_name_4': 36}})
- A.
column_AÂ Â Â Â int64
column_BÂ Â float64
column_CÂ Â float64
column_DÂ Â Â object
column_EÂ Â Â Â int64
- B.
column_AÂ Â Â Â int64
column_BÂ Â Â Â int32
column_CÂ Â Â Â int32
column_DÂ Â Â int64
column_EÂ Â Â Â int64
- C.
column_AÂ Â Â Â int64
column_BÂ Â Â Â int64
column_CÂ Â Â Â int64
column_DÂ Â Â object
column_EÂ Â Â Â int64