I have a pandas dataframe that looks similar to below (I have it in CSV now, since it's on my computer at work):
UNITID,COMPETITORID,COMPETORNAME,PRICE,DATECHANGE 123,555,xyz 1, 2.33,3/3/2013 123,555,xyz 1, 2.34,3/5/2013 123,555,xyz 1, 2.24,3/15/2013 123,666,xyz 2, 4.24,2/15/2013 123,666,xyz 2, 4.44,3/15/2013 123,666,xyz 2, 1.44,3/25/2013 223,777,xyz 3, 2.44,3/25/2013 223,777,xyz 3, 2.54,3/28/2013 223,777,xyz 3, 1.54,3/29/2013
I am trying to fill in the gaps in dates, ex:
123,555,xyz 1, 2.33,3/3/2013 123,555,xyz 1, 2.33,3/4/2013 123,555,xyz 1, 2.34,3/5/2013 123,555,xyz 1, 2.34,3/6/2013 123,555,xyz 1, 2.34,3/7/2013 123,555,xyz 1, 2.34,3/8/2013 . .
I'm relatively new to Pandas and I've seen some somewhat similar examples, but can't seem to get them to work. I had come up with one solution that was probably inefficient, where I copied the date field, then shifted it up, and subtracted the dates, then iterated through the rows per number of days difference - probably not the best.
Any ideas/advice?
Thanks.