dfsplit = dfresult['val'].str.split('\n').apply(lambda x: pd.Series(x))
dfsplit2 = dfsplit.stack().reset_index(level=1, drop=True)
dfrow = pd.merge(pd.DataFrame(dfsplit2), dfresult, left_index=True, right_index=True, how='left').drop('val', axis=1)
dfrow.rename(columns={0:'value'}, inplace=True)
dfrow = dfrow[['opid','dt','value']]
반응형