2886. Change Data Type
All prompts are owned by LeetCode. To view the prompt, click the title link above.
First completed : May 30, 2024
Last updated : July 01, 2024
Related Topics : N/A
Acceptance Rate : 87.5 %
import pandas as pd
def changeDatatype(students: pd.DataFrame) -> pd.DataFrame:
# return students.astype({'student_id': int, 'name': object, 'age': int, 'grade': int})
return students.astype({'grade': int})