dataframe_from_2d_array

dataframe_from_2d_array = <function dataframe_from_2d_array>

Construct DataFrame from 2D array.

See column_from_1d_array for related 1D function.

Only Array-API-compliant 2D arrays are supported.

The resulting columns will have the dtype corresponding to the Array API one:

  • ‘bool’ -> Bool()

  • ‘int8’ -> Int8()

  • ‘int16’ -> Int16()

  • ‘int32’ -> Int32()

  • ‘int64’ -> Int64()

  • ‘uint8’ -> UInt8()

  • ‘uint16’ -> UInt16()

  • ‘uint32’ -> UInt32()

  • ‘uint64’ -> UInt64()

  • ‘float32’ -> Float32()

  • ‘float64’ -> Float64()

Parameters:
  • array (array) – array-API compliant 2D array

  • names (Sequence[str]) – Names to give columns.

Returns:

DataFrame