Skip to content

Conversation

@ueshin
Copy link
Collaborator

@ueshin ueshin commented Aug 20, 2019

No description provided.

dtype: object
"""
if len(self._internal.index_columns) != 1:
raise ValueError("Single index must be set to transpose the current DataFrame.")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

[scol_for(sdf, index_column), F.col("pairs.key"), F.col("pairs.value")])
exploded_df = self._sdf.withColumn("pairs", pairs).select(
[F.to_json(F.array([scol.cast('string')
for scol in self._internal.index_scols])).alias('index'),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@softagram-bot
Copy link

Softagram Impact Report for pull/664 (head commit: febf918)

⭐ Change Overview

Showing the changed files, dependency changes and the impact - click for full size
(Open in Softagram Desktop for full details)

📄 Full report

Give feedback on this report to [email protected]

@ueshin
Copy link
Collaborator Author

ueshin commented Aug 21, 2019

I'd merge this for now. Thanks!

@ueshin ueshin merged commit fd1cf0d into databricks:master Aug 21, 2019
@ueshin ueshin deleted the transpose branch August 21, 2019 21:14
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

Successfully merging this pull request may close these issues.

3 participants