Is it possible to select the negation of this list from pandas dataframe ?. For example, let's say I have the following data file
T1_V2 T1_V3 T1_V4 T1_V5 T1_V6 T1_V7 T1_V8 1 15 3 2 NBN 4 16 14 5 HBN 1 10 10 5 NKN
and I want to display all columns, but column T1_V6. I usually do this:
df = df[["T1_V2","T1_V3","T1_V4","T1_V5","T1_V7","T1_V8"]]
My question is, is there a way around this for the opposite, something like this
df = df[!["T1_V6"]]
python pandas
Medali
source share