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

to parquet does not work with default entityset #202

Closed
8bit-pixies opened this issue Aug 3, 2018 · 1 comment
Closed

to parquet does not work with default entityset #202

8bit-pixies opened this issue Aug 3, 2018 · 1 comment

Comments

@8bit-pixies
Copy link

Bug/Feature Request Description

to_parquet does not work off entitysets consistently.

To reproduce:

import featuretools as ft
es_train = ft.demo.load_mock_customer(return_entityset=True, random_seed=0)
es_train.to_parquet("something")

Errors out with:

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-13-a683aa05b604> in <module>()
----> 1 es_train.to_parquet('test')

/usr/local/anaconda/lib/python2.7/site-packages/featuretools/entityset/entityset.pyc in to_parquet(self, path)
    220         '''
    221 
--> 222         write_entityset(self, path, serialization_method='parquet')
    223         return self
    224 

/usr/local/anaconda/lib/python2.7/site-packages/featuretools/entityset/serialization.pyc in write_entityset(entityset, path, serialization_method, engine, compression)
     88                                                       metadata,
     89                                                       engine=engine,
---> 90                                                       compression=compression)
     91             elif serialization_method == 'pickle':
     92                 metadata = _write_pickle_entity_data(temp_dir,

/usr/local/anaconda/lib/python2.7/site-packages/featuretools/entityset/serialization.pyc in _write_parquet_entity_data(root, entity, metadata, engine, compression)
    168 
    169     entity_size += os.stat(df_filename).st_size
--> 170     if entity.last_time_index:
    171         rel_lti_filename = os.path.join(entity.id, 'lti.parq')
    172         lti_filename = os.path.join(root, rel_lti_filename)

/usr/local/anaconda/lib/python2.7/site-packages/pandas/core/generic.pyc in __nonzero__(self)
   1571         raise ValueError("The truth value of a {0} is ambiguous. "
   1572                          "Use a.empty, a.bool(), a.item(), a.any() or a.all()."
-> 1573                          .format(self.__class__.__name__))
   1574 
   1575     __bool__ = __nonzero__

ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().

Issues created here on Github are for bugs or feature requests. For usage questions and questions about errors, please ask on Stack Overflow with the featuretools tag. Check the documentation for further guidance on where to ask your question.

@kmax12
Copy link
Contributor

kmax12 commented Aug 3, 2018

@chappers thanks for the report. this is fixed in #204 and will go out in the next release

kmax12 added a commit that referenced this issue Aug 3, 2018
* fixes #202 with test

* improved fixed

* fixed linting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants