question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

concat(axis=1) currently is not supported

See original GitHub issue

Concatenating along the columns is a common use case but currently isn’t supported in koalas. We can achieve this by joining the dataframes by their index.

>>> df4 = pd.DataFrame([['bird', 'polly'], ['monkey', 'george']],
...                    columns=['animal', 'name'])
>>> pd.concat([df1, df4], axis=1)
  letter  number  animal    name
0      a       1    bird   polly
1      b       2  monkey  george

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
HyukjinKwoncommented, Aug 6, 2019

I think this can be done with join(index_column) Are you interested in submitting a PR?

0reactions
HyukjinKwoncommented, Nov 5, 2019

You can work around as below:

>>> import databricks.koalas as ks
>>> df1 = ks.DataFrame([['bird', 'polly'], ['monkey', 'george']],
...                    columns=['animal', 'name'])
>>> df2 = ks.DataFrame([[1, 2], [3, 4]],
...                    columns=['num', 'int'])
>>> ks.set_option('compute.ops_on_diff_frames', True)
>>> df1['num'] = df2.num
>>> df1['int'] = df2.int
>>> df1
   animal    name  num  int
0    bird   polly    1    2
1  monkey  george    3    4

In fact, are you interested in creating a PR like the above? cc @itholic, @charlesdong1991, @harupy

Read more comments on GitHub >

github_iconTop Results From Across the Web

python - Concat not working as expected - Stack Overflow
I want to combine this 2 into 1 file. My approach push the data into dataframe and used concat on them get the...
Read more >
Merge, join, and concatenate — pandas 0.24.2 documentation
This is useful if you are concatenating objects where the concatenation axis does not have meaningful indexing information. Note the index values on...
Read more >
dask.dataframe.multi.concat - Dask documentation
When axis=1, concatenate DataFrames column-wise: Allowed if all divisions are known. If any of division is unknown, it raises ValueError. Parameters.
Read more >
Pandas Concat Two DataFrames Explained
When you concat() two pandas DataFrames on rows, it. ... When you use concat() to join two DataFrames, it supports only inner and...
Read more >
Pandas concat() Examples - DigitalOcean
Pandas concat() method is used to concatenate pandas objects such as ... sort: Sort non-concatenation axis if it is not already aligned when ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found