I'm creating a new DataFrame from another DataFrame. I have the first and last row in a different variables each one. What do I need to extract this rows to create a new DataFrame?
- I already checked the variables are right but when I created the new DataFrame and used .describe() but then the DataFrame is empty.
- I tried replacing the variables for the actual dates and in this case one of the statistics is wrong because the output for first is wrong.
FIRST TRY
corrected_log = git_log.loc['first_commit_timestamp':'last_commit_timestamp', : ]
print(corrected_log.describe())
OUTPUT
timestamp author
count 0 0
unique 0 0
SECOND TRY
corrected_log = git_log.loc['2005-04-16 22:20:36':'2019-04-05 05:07:45', : ]
OUTPUT
timestamp author
count 1400 1400
unique 1357 393
top 2014-12-11 23:56:04 Benjamin Romer
freq 15 46
first 2013-10-02 14:56:14 NaN
last 2015-08-01 10:03:00 NaN
What I expected the output of first date '2005-04-16 22:20:36'
but the actual output is '2013-10-02 14:56:14'
. It seems that the first row is wrong in the new DataFrame.