Re: creating vector from df.intertuples

2017-04-17 Thread Peter Otten
Richard Medina wrote: > I want to create a vector from a dataframe in a loop. Then I want to > create a new column from this vector. > > for row in df.itertuples(): > mm = str(row.t) #selecting "t" column > nn = get_sec(mm) #this function converts time to seconds > d

creating vector from df.intertuples

2017-04-17 Thread Richard Medina
I want to create a vector from a dataframe in a loop. Then I want to create a new column from this vector. for row in df.itertuples(): mm = str(row.t) #selecting "t" column nn = get_sec(mm) #this function converts time to seconds df["s"] = nn #I want to add my new ve