Method: Polars::DataFrame#dtypes

Defined in:
lib/polars/data_frame.rb

#dtypesArray

Get dtypes of columns in DataFrame. Dtypes can also be found in column headers when printing the DataFrame.

Examples:

df = Polars::DataFrame.new(
  {
    "foo" => [1, 2, 3],
    "bar" => [6.0, 7.0, 8.0],
    "ham" => ["a", "b", "c"]
  }
)
df.dtypes
# => [Polars::Int64, Polars::Float64, Polars::Utf8]


358
359
360
# File 'lib/polars/data_frame.rb', line 358

def dtypes
  _df.dtypes
end