[
https://issues.apache.org/jira/browse/ARROW-6805?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Antoine Pitrou closed ARROW-6805.
---------------------------------
Resolution: Won't Fix
The ship has sailed a long time ago on this. Closing as this is a very minor
annoyance.
> [Python] Should the new field_ argument on Table.set_column() be optional?
> (Unnecessary breaking change)
> --------------------------------------------------------------------------------------------------------
>
> Key: ARROW-6805
> URL: https://issues.apache.org/jira/browse/ARROW-6805
> Project: Apache Arrow
> Issue Type: Bug
> Components: Python
> Affects Versions: 0.15.0
> Environment: All
> Reporter: Igor Tavares
> Priority: Trivial
> Labels: easyfix
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> The new *field_* argument (Table.set_column() on version 0.15.0) helps to add
> extra information on the column metadata. But it should not be mandatory, in
> some cases it is simply redundant like that:
>
> {code:python}
> import pandas as pd
> import pyarrow as pa
> df = pd.DataFrame({"foo": [1, 2, 3]})
> tbl = pa.Table.from_pandas(df=df, preserve_index=False)
> if pa.__version__ == "0.15.0":
> field = pa.field(name="foo", type="double")
> tbl = tbl.set_column(0, field, tbl.column("foo").cast("double"))
> else:
> tbl = tbl.set_column(0, tbl.column("foo").cast("double"))
> {code}
> I think that this argument should be optional to avoid redundant code and to
> keep compatibility with version <0.15.0.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)