Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Polars to v0.44 #1031

Merged
merged 10 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/explorer/data_frame.ex
Original file line number Diff line number Diff line change
Expand Up @@ -6232,8 +6232,8 @@ defmodule Explorer.DataFrame do
#Explorer.DataFrame<
Polars[2 x 3]
names string ["dogs", "cats"]
dogs f64 [1.0000000000000002, 0.5447047794019219]
cats f64 [0.5447047794019219, 1.0]
dogs f64 [1.0, 0.5447047794019223]
cats f64 [0.5447047794019223, 1.0]
>
"""
@doc type: :single
Expand Down
24 changes: 12 additions & 12 deletions lib/explorer/query.ex
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ defmodule Explorer.Query do
...> )
#Explorer.DataFrame<
Polars[150 x 5]
sepal_length f64 [-1.0840606189132322, -1.3757361217598405, -1.66741162460645, -1.8132493760297554, -1.2298983703365363, ...]
sepal_width f64 [2.3722896125315045, -0.28722789030650403, 0.7765791108287005, 0.2446756102610982, 2.9041931130991068, ...]
petal_length f64 [-0.7576391687443839, -0.7576391687443839, -0.7897606710936369, -0.7255176663951307, -0.7576391687443839, ...]
petal_width f64 [-1.7147014356654708, -1.7147014356654708, -1.7147014356654708, -1.7147014356654708, -1.7147014356654708, ...]
sepal_length f64 [-1.0840606189132338, -1.3757361217598423, -1.6674116246064523, -1.8132493760297579, -1.229898370336538, ...]
sepal_width f64 [2.3722896125315063, -0.2872278903065042, 0.7765791108287009, 0.24467561026109835, 2.904193113099109, ...]
petal_length f64 [-0.7576391687443842, -0.7576391687443842, -0.7897606710936372, -0.725517666395131, -0.7576391687443842, ...]
petal_width f64 [-1.714701435665472, -1.714701435665472, -1.714701435665472, -1.714701435665472, -1.714701435665472, ...]
species string ["Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", ...]
>

Expand All @@ -136,10 +136,10 @@ defmodule Explorer.Query do
...> )
#Explorer.DataFrame<
Polars[150 x 5]
sepal_length f64 [-1.0840606189132322, -1.3757361217598405, -1.66741162460645, -1.8132493760297554, -1.2298983703365363, ...]
sepal_width f64 [2.3722896125315045, -0.28722789030650403, 0.7765791108287005, 0.2446756102610982, 2.9041931130991068, ...]
petal_length f64 [-0.7576391687443839, -0.7576391687443839, -0.7897606710936369, -0.7255176663951307, -0.7576391687443839, ...]
petal_width f64 [-1.7147014356654708, -1.7147014356654708, -1.7147014356654708, -1.7147014356654708, -1.7147014356654708, ...]
sepal_length f64 [-1.0840606189132338, -1.3757361217598423, -1.6674116246064523, -1.8132493760297579, -1.229898370336538, ...]
sepal_width f64 [2.3722896125315063, -0.2872278903065042, 0.7765791108287009, 0.24467561026109835, 2.904193113099109, ...]
petal_length f64 [-0.7576391687443842, -0.7576391687443842, -0.7897606710936372, -0.725517666395131, -0.7576391687443842, ...]
petal_width f64 [-1.714701435665472, -1.714701435665472, -1.714701435665472, -1.714701435665472, -1.714701435665472, ...]
species string ["Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", ...]
>

Expand Down Expand Up @@ -189,10 +189,10 @@ defmodule Explorer.Query do
...> )
#Explorer.DataFrame<
Polars[150 x 5]
sepal_length f64 [-1.0840606189132322, -1.3757361217598405, -1.66741162460645, -1.8132493760297554, -1.2298983703365363, ...]
sepal_width f64 [2.3722896125315045, -0.28722789030650403, 0.7765791108287005, 0.2446756102610982, 2.9041931130991068, ...]
petal_length f64 [-0.7576391687443839, -0.7576391687443839, -0.7897606710936369, -0.7255176663951307, -0.7576391687443839, ...]
petal_width f64 [-1.7147014356654708, -1.7147014356654708, -1.7147014356654708, -1.7147014356654708, -1.7147014356654708, ...]
sepal_length f64 [-1.0840606189132338, -1.3757361217598423, -1.6674116246064523, -1.8132493760297579, -1.229898370336538, ...]
sepal_width f64 [2.3722896125315063, -0.2872278903065042, 0.7765791108287009, 0.24467561026109835, 2.904193113099109, ...]
petal_length f64 [-0.7576391687443842, -0.7576391687443842, -0.7897606710936372, -0.725517666395131, -0.7576391687443842, ...]
petal_width f64 [-1.714701435665472, -1.714701435665472, -1.714701435665472, -1.714701435665472, -1.714701435665472, ...]
species string ["Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa", ...]
>

Expand Down
11 changes: 5 additions & 6 deletions lib/explorer/series.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2938,7 +2938,7 @@ defmodule Explorer.Series do
iex> s1 = Series.from_list([1, 8, 3])
iex> s2 = Series.from_list([4, 5, 2])
iex> Series.correlation(s1, s2)
0.5447047794019219
0.5447047794019223
"""
@doc type: :aggregation
@spec correlation(
Expand All @@ -2959,6 +2959,8 @@ defmodule Explorer.Series do
@doc """
Compute the covariance between two series.

It may return `nil` in case covariance cannot be computed.

## Supported dtypes

* floats: #{Shared.inspect_dtypes(@float_dtypes, backticks: true)}
Expand Down Expand Up @@ -6711,14 +6713,11 @@ defmodule Explorer.Series do
>

If the decoded value does not match the given `dtype`,
nil is returned for the given entry:
an error is raised:

iex> s = Series.from_list(["\\"1\\""])
iex> Series.json_decode(s, {:s, 64})
#Explorer.Series<
Polars[1]
s64 [nil]
>
** (RuntimeError) Polars Error: error deserializing JSON: error deserializing value \"String(\"1\")\" as numeric. \\\n Try increasing `infer_schema_length` or specifying a schema.\n

It raises an exception if the string is invalid JSON.
"""
Expand Down
Loading
Loading