You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Joris Van den Bossche (JIRA)" <ji...@apache.org> on 2019/08/08 14:55:00 UTC

[jira] [Comment Edited] (ARROW-6173) [Python] error loading csv submodule

    [ https://issues.apache.org/jira/browse/ARROW-6173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16903046#comment-16903046 ] 

Joris Van den Bossche edited comment on ARROW-6173 at 8/8/19 2:54 PM:
----------------------------------------------------------------------

The IO modules are not imported by default in the main namespace, so you need to import it explicitly (the same is true for `pyarrow.parquet`), exactly as you did, or with 

{code}
import pyarrow.csv
{code}



was (Author: jorisvandenbossche):
The IO modules are not imported by default, so you need to import it explicitly (the same is true for `pyarrow.parquet`), exactly as you did, or with 

{code}
import pyarrow.csv
{code}


> [Python] error loading csv submodule
> ------------------------------------
>
>                 Key: ARROW-6173
>                 URL: https://issues.apache.org/jira/browse/ARROW-6173
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: Python
>    Affects Versions: 0.12.0, 0.13.0, 0.14.0, 0.14.1
>         Environment: Windows 7, conda 4.7.11
>            Reporter: Igor Yastrebov
>            Priority: Major
>              Labels: csv
>
> When I create a new environment in conda:
> {code:java}
> conda create -n pyarrow-test python=3.7 pyarrow=0.14.1
> {code}
> and try to read a csv file:
> {code:java}
> import pyarrow as pa
> pa.csv.read_csv('test.csv'){code}
> it fails with an error:
> {code:java}
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> AttributeError: module 'pyarrow' has no attribute 'csv'
> {code}
> However, loading it directly works:
> {code:java}
> import pyarrow.csv as pc
> table = pc.read_csv('test.csv')
> {code}
> and using pa.csv.read_csv() after loading it directly also works.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)