0

I have a code-

colA = s[ s >= 3 ].index.get_level_values(0).unique().values
df=df[df["CITY"].isin(colA) ]

I want to add multiple columns in the df=df[df["CITY"].isin(colA) ] command the columns are CITY, NUMBER and AREA.

Do i just add the conditions separately with & conditions or is there a better way?

link to question-Finding consecutive days in the pandas dataframe

In this question, I want to add two more columns colA colB colC in the answer provided by @MkWTF

ubuntu_noob
  • 2,305
  • 6
  • 23
  • 64
  • 3
    Can you add some data, [minimal, complete, and verifiable example](http://stackoverflow.com/help/mcve)? – jezrael Feb 05 '20 at 08:22
  • 3
    Agree with @jezrael, please provide a [minimal reproducable example](https://stackoverflow.com/help/minimal-reproducible-example), so we can better understand what you are trying to do. – AnsFourtyTwo Feb 05 '20 at 08:24
  • 1
    [JFYI](https://stackoverflow.com/questions/20109391/how-to-make-good-reproducible-pandas-examples) – Danila Ganchar Feb 05 '20 at 08:29

0 Answers0