I have a data frame, each rows has a string like (without space between the values) [1 2 3 4 5]. I want to get the rows as an array. Here is part of my data frame
Here is an example of my data frame:
import pandas as pd
df = pd.DataFrame()
df['a'] = [1, 2, 3]
df['b'] = [str([1 2]), str([2 3 4 5 6 7]), str([2 3 4 5])]
The output which I want is, for example row with index 1 is:
row_2 = np.array([2, 3, 4, 5, 6, 7])
could you please help me with that? Thanks.
