Skip to content
Prev 320464 / 398506 Next

How to delete Identical columns

Hi, Katherine,

IF the naming scheme of the columns of your data frame is consistently 
<stringwithoutdot> and <stringwithoutdot.number> if duplicated columns 
appear THEN (something like)

df[ -grep( "\\.", names( df))]

could help. (But it's maybe more efficient to avoid - a priori - producing 
duplicated columns, if the data frame is large, as you say.)

  Regards -- Gerrit
On Thu, 28 Mar 2013, Katherine Gobin wrote: