My Pyspark dataframe is something like this:
|ID|A|
+--+-------+
|1|7800028|
|2|700024|
|3|720004|
|4|70004|
|5|700004|
I want to remove the 3 zeros occurring together and get numbers to the left and right of the three zeroes in separate columns. Something like this:
|ID|B|C
+--+-------+
|1|78|28|
|2|7|24|
|3|72|4|
|4|7|4|
|5|70|4
The problem is col A can be of varied length with values in B ranging from 0-99 and values in C ranging from 0-99.
Therefore I can't seem to use substring to get B. C is still doable through substring function.