how to add row in spark dataframe
# Create hard coded row
unknown_list = [[‘0’, ‘Unknown’]]
# turn row into dataframe
unknown_df = spark.createDataFrame(unknown_list)
# union with existing dataframe
df = df.union(unknown_df)
how to add row in spark dataframe
# Create hard coded row
unknown_list = [[‘0’, ‘Unknown’]]
# turn row into dataframe
unknown_df = spark.createDataFrame(unknown_list)
# union with existing dataframe
df = df.union(unknown_df)
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us