0

dataframe issue: I am trying to concatenate a value of a cell with previous cell if a certain condition is met.

enter image description here

Assume this is the data and i want to concatenate the value of those where column A is not null and other columns are to the previous cells

for eg I want to concatenate the row 4and 3, 7 and 6 thereby dropping the row 4 and 7

expected output should be

enter image description here

This is a sample data, my original dataframe consists of multiple rows

  • Does this answer your question? [How to merge two rows in a dataframe pandas](https://stackoverflow.com/questions/41693000/how-to-merge-two-rows-in-a-dataframe-pandas) – amance May 23 '23 at 19:27

0 Answers0