All Questions
2 questions
0
votes
2
answers
60
views
Expand a dataframe row into multiple rows based on string conditions
I have some raw data similar to the dataframe below:
df = pd.DataFrame([{'var1': '220-224 (Even) roadname1', 'var2': 'location 1', 'var3': 'area 1'},
{'var1': 'site of 5 to 9 (odd) ...
-1
votes
1
answer
531
views
R dataframe, expand rows by string variable [duplicate]
Can anyone please help with this little data.frame expansion problem?
Thanks in advance!
# I have
data.frame(rbind(c("1", "2", "3", "a/b/c"),
c("11", "0", "5", "c/d"),
...