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

add jvm import org.apache.spark.sql.api.python.* #419

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jinhaichen
Copy link

What changes were proposed in this pull request?

jvm import org.apache.spark.sql.api.python.*. Or else pandas dataframe to spark dataframe will fail.

How was this patch tested?

import pandas as pd
from pyspark.sql import SparkSession

pandas_df = pd.DataFrame({
    'A': [1, 2, 3],
    'B': ['a', 'b', 'c']
})

spark = SparkSession.builder.getOrCreate()
spark_df = spark.createDataFrame(pandas_df)
spark_df.show()

this failed before, and now it's OK.

@jinhaichen
Copy link
Author

any one check here?

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