daru icon indicating copy to clipboard operation
daru copied to clipboard

concatenation between vector and dataframe

Open genya0407 opened this issue 9 years ago • 4 comments

Daru::DataFrame cannot be concatenated with Daru::Vector. The inverse is also true.

Pandas can do it. http://pandas.pydata.org/pandas-docs/stable/merging.html#concatenating-with-mixed-ndims

genya0407 avatar Aug 23 '16 11:08 genya0407

Daru can concatenate dataframes with a different set of vectors. Use #to_df on anything that might be a vector and you should be able to concatenate them.

gnilrets avatar Aug 23 '16 14:08 gnilrets

@v0dro - Makes me think we might want to litter many of the dataframe methods with #to_df at the beginning to force anything that might be a vector into a single-vector dataframe.

gnilrets avatar Aug 23 '16 14:08 gnilrets

@v0dro - Makes me think we might want to litter many of the dataframe methods with #to_df at the beginning to force anything that might be a vector into a single-vector dataframe.

That can be a quick fix for now. A more long term solution would be implementing those methods natively for Vector.

v0dro avatar Aug 23 '16 18:08 v0dro

@gnirets Thanks, I'll concat with that solution 😄

genya0407 avatar Aug 23 '16 21:08 genya0407