Complete the code to convert the 'age' column to integer type.
df['age'] = df['age'].[1](int)
The astype method is used to change the data type of a pandas Series or DataFrame column.
Complete the code to convert the 'price' column to float type.
df['price'] = df['price'].[1](float)
Use astype(float) to convert a column to float type in pandas.
Fix the error in the code to convert the 'date' column to string type.
df['date'] = df['date'].[1](str)
The correct method to change data types in pandas is astype. Other options are not valid pandas methods.
Fill both blanks to convert the 'score' column to float and then to string.
df['score'] = df['score'].[1](float).[2](str)
You can chain astype calls to convert data types step by step.
Fill all three blanks to create a new column 'age_str' by converting 'age' to string after converting to float.
df['age_str'] = df['age'].[1](int).[2](float).[3](str)
Use astype for each step of conversion. This chains conversions from int to float to string.