2877. Create a DataFrame from List

Updated: 2024-03-12
1 min read
[]

On This Page

LeetCode problem 2877

import pandas as pd


def createDataframe(student_data: List[List[int]]) -> pd.DataFrame:
    return pd.DataFrame(student_data, columns=['student_id', 'age'])