[jira] [Updated] (ARROW-2136) [Python] Non-nullable schema fields not checked in conversions from pandas
[ https://issues.apache.org/jira/browse/ARROW-2136?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] ASF GitHub Bot updated ARROW-2136: -- Labels: pull-request-available (was: ) > [Python] Non-nullable schema fields not checked in conversions from pandas > -- > > Key: ARROW-2136 > URL: https://issues.apache.org/jira/browse/ARROW-2136 > Project: Apache Arrow > Issue Type: Bug > Components: Python >Affects Versions: 0.8.0 >Reporter: Matthew Gilbert >Assignee: Wes McKinney >Priority: Major > Labels: pull-request-available > Fix For: 0.14.0 > > > If you provide a schema with {{nullable=False}} but pass a {{DataFrame}} > which in fact has nulls it appears the schema is ignored? I would expect an > error here. > {code} > import pyarrow as pa > import pandas as pd > df = pd.DataFrame({"a":[1.2, 2.1, pd.np.NaN]}) > schema = pa.schema([pa.field("a", pa.float64(), nullable=False)]) > table = pa.Table.from_pandas(df, schema=schema) > table[0] > > chunk 0: > [ > 1.2, > 2.1, > NA > ] > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (ARROW-2136) [Python] Non-nullable schema fields not checked in conversions from pandas
[ https://issues.apache.org/jira/browse/ARROW-2136?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Wes McKinney updated ARROW-2136: Fix Version/s: (was: 0.13.0) 0.14.0 > [Python] Non-nullable schema fields not checked in conversions from pandas > -- > > Key: ARROW-2136 > URL: https://issues.apache.org/jira/browse/ARROW-2136 > Project: Apache Arrow > Issue Type: Bug > Components: Python >Affects Versions: 0.8.0 >Reporter: Matthew Gilbert >Priority: Major > Fix For: 0.14.0 > > > If you provide a schema with {{nullable=False}} but pass a {{DataFrame}} > which in fact has nulls it appears the schema is ignored? I would expect an > error here. > {code} > import pyarrow as pa > import pandas as pd > df = pd.DataFrame({"a":[1.2, 2.1, pd.np.NaN]}) > schema = pa.schema([pa.field("a", pa.float64(), nullable=False)]) > table = pa.Table.from_pandas(df, schema=schema) > table[0] > > chunk 0: > [ > 1.2, > 2.1, > NA > ] > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (ARROW-2136) [Python] Non-nullable schema fields not checked in conversions from pandas
[ https://issues.apache.org/jira/browse/ARROW-2136?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Wes McKinney updated ARROW-2136: Fix Version/s: 0.13.0 > [Python] Non-nullable schema fields not checked in conversions from pandas > -- > > Key: ARROW-2136 > URL: https://issues.apache.org/jira/browse/ARROW-2136 > Project: Apache Arrow > Issue Type: Bug > Components: Python >Affects Versions: 0.8.0 >Reporter: Matthew Gilbert >Priority: Major > Fix For: 0.13.0 > > > If you provide a schema with {{nullable=False}} but pass a {{DataFrame}} > which in fact has nulls it appears the schema is ignored? I would expect an > error here. > {code} > import pyarrow as pa > import pandas as pd > df = pd.DataFrame({"a":[1.2, 2.1, pd.np.NaN]}) > schema = pa.schema([pa.field("a", pa.float64(), nullable=False)]) > table = pa.Table.from_pandas(df, schema=schema) > table[0] > > chunk 0: > [ > 1.2, > 2.1, > NA > ] > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (ARROW-2136) [Python] Non-nullable schema fields not checked in conversions from pandas
[ https://issues.apache.org/jira/browse/ARROW-2136?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Wes McKinney updated ARROW-2136: Summary: [Python] Non-nullable schema fields not checked in conversions from pandas (was: Non nullable schema ignored) > [Python] Non-nullable schema fields not checked in conversions from pandas > -- > > Key: ARROW-2136 > URL: https://issues.apache.org/jira/browse/ARROW-2136 > Project: Apache Arrow > Issue Type: Bug > Components: Python >Affects Versions: 0.8.0 >Reporter: Matthew Gilbert >Priority: Major > > If you provide a schema with {{nullable=False}} but pass a {{DataFrame}} > which in fact has nulls it appears the schema is ignored? I would expect an > error here. > {code} > import pyarrow as pa > import pandas as pd > df = pd.DataFrame({"a":[1.2, 2.1, pd.np.NaN]}) > schema = pa.schema([pa.field("a", pa.float64(), nullable=False)]) > table = pa.Table.from_pandas(df, schema=schema) > table[0] > > chunk 0: > [ > 1.2, > 2.1, > NA > ] > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)