Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 706 Bytes

_2886. Change Data Type.md

File metadata and controls

33 lines (22 loc) · 706 Bytes

All prompts are owned by LeetCode. To view the prompt, click the title link above.

Back to top


First completed : May 30, 2024

Last updated : July 01, 2024


Related Topics : N/A

Acceptance Rate : 87.5 %


Solutions

Python

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})