My code-
for x in df.ROAD_NAME_NUMBER:
if int(x) == x:
df.ROAD_NAME_NUMBER= 'Road '+ df.ROAD_NAME_NUMBER
I getting the error- ValueError: invalid literal for int() with base 10: 'Avenue 5, Lane 23'
My expected dataframe should look like this -
When any integer will be found in dataframe add "Road" before it.Otherwise ignore.
import pandas a pd
df = pd.DataFrame({'ROAD_NAME_NUMBER':['4','2','1','8','2','AVE 5,LANE 2']})
>>> print(df)
ROAD_NAME_NUMBER
0 4
1 2
2 1
3 8
4 2
5 AVE 5,LANE 2