I want to return a df based on a search value where the value contains square brackets: ‘Worktime[1]’.
However, when I search for ‘Worktime[1]’ nothing is returned but when I search for ‘Worktime’ it does return the specific rows.
The thing is: there are multiple variables called ‘Worktime’ with different numbers and I need a specific one.
How can I search for variables that contain square brackets?
dfVar = dfProgramma.loc[dfProgramma[0].str.contains('WorkTime[1]')]
submitted by /u/anon-93847479
[link] [comments]
r/learnpython I want to return a df based on a search value where the value contains square brackets: ‘Worktime[1]’. However, when I search for ‘Worktime[1]’ nothing is returned but when I search for ‘Worktime’ it does return the specific rows. The thing is: there are multiple variables called ‘Worktime’ with different numbers and I need a specific one. How can I search for variables that contain square brackets? dfVar = dfProgramma.loc[dfProgramma[0].str.contains(‘WorkTime[1]’)] submitted by /u/anon-93847479 [link] [comments]
I want to return a df based on a search value where the value contains square brackets: ‘Worktime[1]’.
However, when I search for ‘Worktime[1]’ nothing is returned but when I search for ‘Worktime’ it does return the specific rows.
The thing is: there are multiple variables called ‘Worktime’ with different numbers and I need a specific one.
How can I search for variables that contain square brackets?
dfVar = dfProgramma.loc[dfProgramma[0].str.contains('WorkTime[1]')]
submitted by /u/anon-93847479
[link] [comments]