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

List of strings is not a supported format to create dataframe. #18

Open
MdShahidAfridiP opened this issue Feb 21, 2024 · 1 comment
Open

Comments

@MdShahidAfridiP
Copy link

df = spark.createDataFrame(list('1'), schema=schema)

@ahmedkadeh
Copy link

Hello,
you just need to create the DF like that :

from pyspark.sql import SparkSession
from pyspark.sql.types import StringType

spark = SparkSession.builder.appName('SparkByExamples.com').getOrCreate()


df = spark.createDataFrame(list('1'), StringType())

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

No branches or pull requests

2 participants