Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2023 07:25 AM
Thanks for your response
Actually, here is my code with when function but I still see the error
binmaster = binmasterdf.withColumnRenamed("tag_number","BinKey")\
.withColumn ("Category", when (length("Bin")==4,'SMALL LOT'), when (length("Bin")==7,'RACKING'), otherwise('FLOOR'))
Is there anything wrong with the above?
Thanks,
John