DataFrame constructor
Create an empty DataFrame
Create a DataFrame from a JavaScript object
object or array of data
Optional
options
data = {'a': [1n, 2n], 'b': [3, 4]}df = pl.DataFrame(data)dfshape: (2, 2)╭─────┬─────╮│ a ┆ b ││ --- ┆ --- ││ u64 ┆ i64 │╞═════╪═════╡│ 1 ┆ 3 │├╌╌╌╌╌┼╌╌╌╌╌┤│ 2 ┆ 4 │╰─────┴─────╯ Copy
data = {'a': [1n, 2n], 'b': [3, 4]}df = pl.DataFrame(data)dfshape: (2, 2)╭─────┬─────╮│ a ┆ b ││ --- ┆ --- ││ u64 ┆ i64 │╞═════╪═════╡│ 1 ┆ 3 │├╌╌╌╌╌┼╌╌╌╌╌┤│ 2 ┆ 4 │╰─────┴─────╯
De-serializes buffer via serde
buffer to deserialize
json | bincode
DataFrame constructor