My dataframe head() looks like this:
followers following
experience userid date
Intermediate 0 2010-01-02 05:28:38 84330 1331
2010-01-02 18:46:36 84330 1331
2010-01-02 18:47:22 84330 1331
2010-01-02 18:50:12 84330 1331
2010-01-02 23:08:55 84330 1331
Where I have more rows. For each userid, I'd like to subtract the first followers value (e.g., in example above, subtract 84330 from all dates in userid=0). Is there some apply() command that will do this?
84330from a datetime which doesn't make sense to me84330from the followers. Meaning for the rows shown above, make thosefollowers0. However future rows may have more, so their value will be their current value minus84330.