Skip to content

feat: support STRUCT data type with Series.struct.field to extract child fields #71

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

Merged
merged 12 commits into from
Oct 3, 2023
Prev Previous commit
Next Next commit
update struct dtype tests
  • Loading branch information
tswast committed Oct 2, 2023
commit a18370888ef720235b2b75d9bbc788ff727cf123
14 changes: 13 additions & 1 deletion tests/system/small/test_dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,19 @@ def test_get_dtypes_array_struct(session):
dtypes = df.dtypes
pd.testing.assert_series_equal(
dtypes,
pd.Series({"array_column": np.dtype("O"), "struct_column": np.dtype("O")}),
pd.Series(
{
"array_column": np.dtype("O"),
"struct_column": pd.ArrowDtype(
pa.struct(
[
("string_field", pa.string()),
("float_field", pa.float64()),
]
)
),
}
),
)


Expand Down