How to subset similar columns in pandas based on keywords like A B C D. Now I have taken this as example is there any better way if new columns were given and logic should work.
df A1 A2 A3 B1 B2 B3 C1 C2 D1 D2 D3 D4 1 a x 1 a x 3 c 7 d s 4 2 b 5 2 b 5 4 d s c 7 d 3 c 7 3 c 7 1 a x 1 a x 4 d s 4 d s b 5 2 b s 7 https://stackoverflow.com/questions/66684175/how-to-subset-a-dataframe-based-on-similar-column-names March 18, 2021 at 11:05AM
没有评论:
发表评论