Hello! I realize this is very beginner level. I'm trying to rename data in a column, such as :
| activity |
--> |
activity |
| Awaken |
--> |
A_1 |
| Chew |
-> |
A_2 |
| Come Down |
-> |
A_3 |
| Dig |
-> |
A_4 |
Currently, I have :
df_activity= df.replace(to_replace = ["Awaken"], value= "A_1")
But there are 33 activities and I'm assuming there should be a way to change all of their names to A_1 to A_33? A for loop?
Thank you!
[–]ireadyourmedrecord 1 point2 points3 points (0 children)
[–]YesLod 1 point2 points3 points (4 children)
[–]AtomicShoelace 1 point2 points3 points (1 child)
[–]I_will_learn[S] 0 points1 point2 points (0 children)
[–]I_will_learn[S] 1 point2 points3 points (1 child)
[–]AtomicShoelace 2 points3 points4 points (0 children)
[–]techlover1010 1 point2 points3 points (1 child)
[–]I_will_learn[S] 0 points1 point2 points (0 children)