Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

5
Best method to transform discontinuous Series of dates into a "days since beginning" variable
Post Body

I have an array of dates in a Pandas DataFrame which looks like this:

3     2015-02-10
4     2015-02-11
5     2015-02-12
6     2015-03-05
7     2015-03-06

As you can see there are gaps in the data; some days don't have observations. What I want to do is turn this into a variable which looks like this

3    25
4    26
5    27
6    48
7    49

Assuming the observation period started 25 days before observation #3 shown here.

Is there a widely used method for this I'm not aware of?

Author
Account Strength
100%
Account Age
12 years
Verified Email
Yes
Verified Flair
No
Total Karma
150,300
Link Karma
18,628
Comment Karma
129,685
Profile updated: 3 days ago
Posts updated: 9 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
9 years ago