Рет қаралды 6,119
Here is the link to the project course:
www.geekcoders...
If you haven't taken my Azure End-to-End Project course then here is the link(More than 450 users have already taken it)
www.geekcoders...
"""
path='/FileStore/tables/csv_with_no_header.csv'
df=spark.read.option('header',True).option('inferschema',True).csv(f'{path}').limit(1)
if(df.schema==schema):
df.write.mode('overwrite').save('/FileStore/tables/csv_with_header_output/')
else:
df=spark.read.option('header',False).schema(schema).csv(f'{path}')
df.write.mode('overwrite').save('/FileStore/tables/csv_with_header_output/')
"""
Please visit my website also for more info
www.geekcoders...
Looking for 1:1 Long mentorship
app.preplaced....
HASHTAGS
TAGS
#tags #hashtags
KZbin Link: / @geekcoders
GeekCoders: www.geekcoders...
LinkedIn: / sagar-prajapati-86073b155
Telegram: lnkd.in/dKz7s3y8
Instagram: lnkd.in/dKz7s3y8
#pyspark #pysparkinterview #spark