Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88075

How to modify using pandas to cell merge

$
0
0

This original data Before:

| 0 | name | age | sex |
| 1 | jan  | 30  | M  |
| 2 | job | address |
| 3 | yes | 42424   | 
| 4 | name| age | sex |
| 5 | jan |  30 |  M  |
| 6 | job | address |
| 7 | yes | 42424   | 
| 8 | name| age | sex |
| 9 | jan |  30 |  M  |
|10 | job | address |
|11 | yes | 42424   | 

After:

| 0 | name | age | sex | job | address |
| 1 | jan  | 30  |  M  | yes | 42424   |
| 2 | jan  | 30  |  M  | yes | 42424   |
| 3 | jan  | 30  |  M  | yes | 42424   |

I want to change the cells using the Python code with the help of pandas. Please help me with this. Thank you.


Viewing all articles
Browse latest Browse all 88075

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>