Skip to content

Instantly share code, notes, and snippets.

@1ambda
Created December 27, 2021 11:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 1ambda/7050380172cde54d084f6238c69e7348 to your computer and use it in GitHub Desktop.
Save 1ambda/7050380172cde54d084f6238c69e7348 to your computer and use it in GitHub Desktop.
dfListingCalendar = dfListingCalendarRaw\
.withColumn("price", regexp_extract(col("price"), "[0-9]+.[0-9]+", 0).cast(DoubleType()))\
.withColumn("adjusted_price", regexp_extract(col("adjusted_price"), "[0-9]+.[0-9]+", 0).cast(DoubleType()))
dfListingCalendar.printSchema()
dfListingCalendar.toPandas()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment