I have a column in my table which have this value :
|col_A|
-------
|00140|
-------
|00120|
-------
|00058|
-------
|00009|
-------
|00052|
I want to delete all 0 in the left. I use pyspark to build the dataframe. You find as below an exemple :
while tab.col_A.like('0%'):
tab = tab.withColumn('tab_B', tab['col_A'][2:5])
When I try to execute this code I have this error :
Cannot convert column into bool
Please help.