Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 
avatar of jezrael

jezrael

jezrael has asked 24 questions and find answers to 3023 problems.

Stats

96.6k
EtPoint
35.0k
Vote count
24
questions
3k
answers

About

Please don't hesitate to contact me:

import pandas as pd
d = {0: [1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 
         1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0], 
     1: [16, 1, 0, 15, 7, 14, 13, 7, 3, 10, 14, 8, 10, 3,  5, 4, 8, 13, 6, 2, 
         11, 11, 0, 12, 9, 16, 12, 15, 9, 1, 4, 5, 6, 2], 
     2: [32, 32, 32, 32, 32, 33, 46, 64, 97, 97, 99, 99, 100, 101, 101, 102, 103, 
         103, 103, 104, 105, 105, 106, 108, 109, 109, 110, 111, 111, 111, 112, 112, 121, 122]}
print (pd.DataFrame(d).pivot(1,0,2).applymap(chr).agg(''.join))

Most time repeating dupes, not easy find:

pivot dupe
https://stackoverflow.com/q/47152691/
booelan indexing dupe
https://stackoverflow.com/q/17071871
idxmax + groupby dupe
https://stackoverflow.com/q/15705630
idxmin + groupby dupe
https://stackoverflow.com/q/23394476
melt dupe
https://stackoverflow.com/q/28654047
explode dupe
https://stackoverflow.com/q/12680754
cumcount dupe
https://stackoverflow.com/q/23435270
map dupe
https://stackoverflow.com/q/24216425
groupby+size+unstack dupe
https://stackoverflow.com/q/39132742
https://stackoverflow.com/q/38278603
sorting inplace dupe
https://stackoverflow.com/q/42613581
factorize dupe
https://stackoverflow.com/q/39357882
groupby+size dupe
https://stackoverflow.com/q/19384532
groupby+ mean dupe
https://stackoverflow.com/q/30482071
transform sum dupe
https://stackoverflow.com/q/30244952
transform size dupe
https://stackoverflow.com/q/37189878
keyerror dupe
https://stackoverflow.com/q/43736163
merge/map dupe
https://stackoverflow.com/q/53010406
value_count dupe
https://stackoverflow.com/q/15411158
numpy select, where dupe
https://stackoverflow.com/q/19913659
wide_to_long dupe
https://stackoverflow.com/q/55766565
reset_index dupe
https://stackoverflow.com/q/36932759