Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23160

I want to fill in the blank SAP IDs in the original data with the corresponding SAP ID from the non-blank entries for the same part number [closed]

$
0
0

i have a dataframe like this

Pno    Sapid    Qtyp1    c1    5p1    c1    3p1    c2    4p1    c2    5p1    c3    2p1    c3    1p1        p1        p1

now i want to generate output as below

Pno    Sapid    Qtyp1    c1    5p1    c1    3p1    c1    p1    c1    p1    c1    p1    c2    4p1    c2    5p1    c2    p1    c2    p1    c2    p1    c3    2p1    c3    1p1    c3    p1    c3    p1    c3    

please write the code in python to get the required output. Like this i have lot of Pno. the blanks are not same for all Pno's

I tried but not getting proper output. because each Pno has different number of blanks.


Viewing all articles
Browse latest Browse all 23160

Trending Articles



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