Skip to content

[SYSTEMML-834] Improve MLContext DataFrame support#218

Closed
deroneriksson wants to merge 2 commits intoapache:masterfrom
deroneriksson:SYSTEMML-834-Improve_mlcontext_dataframe_support
Closed

[SYSTEMML-834] Improve MLContext DataFrame support#218
deroneriksson wants to merge 2 commits intoapache:masterfrom
deroneriksson:SYSTEMML-834-Improve_mlcontext_dataframe_support

Conversation

@deroneriksson
Copy link
Copy Markdown
Member

Adds support for 4 types of DataFrame inputs and outputs via MLContext (doubles with ID column, doubles with no ID column, vectors with ID column, vectors with no ID column).

*/
public DataFrame asDataFrameDoubleNoIDColumn() {
DataFrame df = MLContextConversionUtil.matrixObjectToDataFrame(matrixObject, sparkExecutionContext, false);
df = df.drop("ID");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we need to sort before dropping the "ID" column to ensure the order is correct, i.e. df = df.sort("ID").drop("ID").

@deroneriksson
Copy link
Copy Markdown
Member Author

@dusenberrymw Added sorts before the drops

@dusenberrymw
Copy link
Copy Markdown
Contributor

LGTM.

@deroneriksson
Copy link
Copy Markdown
Member Author

Thank you for reviewing @dusenberrymw! I will merge.

@asfgit asfgit closed this in 97dee8f Aug 25, 2016
j143-zz pushed a commit to j143-zz/systemml that referenced this pull request Nov 4, 2017
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.

2 participants