Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 How to drop column in pandas
#1
Hi,
I have below DataFrame,

Group Category Subject  AC1         AC2    AC3     BM1        BM2    NJ1        NJ2     NJ3  
Va    Vb       Vc       Datecode    Run1   Status  Datecode   Rank   Datecode   Power voltage
HY    JK       KL       2019-08-01   23    29      2019-08-12 0      2019-08-03  123   110   
HH    MK       VN       2019-08-09   28    45      2019-08-06 32     2019-08-13  125   220 


I want to delete columns with column name 'Datecode" in "zeroth row", I can not use df.drop
df.drop(['Datecode'], axis=1), but it does not work. Kindly help, how to do this.
Quote

Top Page

Messages In This Thread
How to drop column in pandas - by SriMekala - Aug-26-2019, 02:10 PM
RE: How to drop column in pandas - by ThomasL - Aug-26-2019, 05:00 PM
RE: How to drop column in pandas - by perfringo - Aug-26-2019, 05:26 PM
RE: How to drop column in pandas - by snippsat - Aug-26-2019, 06:36 PM

Possibly Related Threads...
Thread Author Replies Views Last Post
  Pandas - Dynamic column aggregation based on another column theroadbacktonature 0 156 Apr-17-2020, 04:54 PM
Last Post: theroadbacktonature
  Add column to CSV using Pandas nsadams87xx 2 261 Apr-15-2020, 08:41 PM
Last Post: snippsat
  add formatted column to pandas data frame alkaline3 0 182 Mar-22-2020, 06:44 PM
Last Post: alkaline3
  itertuples, new column, datetime, pandas karlito 6 597 Nov-29-2019, 11:07 AM
Last Post: karlito
  sort values of a column pandas karlito 2 535 Oct-22-2019, 06:11 AM
Last Post: karlito
  Dropping a column from pandas dataframe marco_ita 6 4,210 Sep-07-2019, 08:36 AM
Last Post: marco_ita
  Pandas Import CSV count between numerical values within 1 Column ptaylor520 3 495 Jul-16-2019, 08:13 AM
Last Post: ptaylor520
  How to use the excel filename as a value to populate new column, using Pandas? Dequanharrison 5 1,337 Jun-26-2019, 11:11 PM
Last Post: Dequanharrison
  pandas change row value an existing column with conditionals Gigux 1 755 Jun-22-2019, 08:04 PM
Last Post: Gigux
  How to delete column if entire column values are "nan" Sri 4 1,016 Apr-13-2019, 12:16 PM
Last Post: Sri

Forum Jump:


Users browsing this thread: 1 Guest(s)