exploring-the-evolution-of-linux-datacamp-project's Issues
TypeError: Cannot compare type 'Timestamp' with type 'int'
# determining the first real commit timestamp
first_commit_timestamp = git_log['timestamp'].iloc[-1]
# determining the last sensible commit timestamp
last_commit_timestamp = pd.to_datetime('today')
# filtering out wrong timestamps
corrected_log = git_log[(git_log['timestamp']>=first_commit_timestamp) & (git_log['timestamp']<=last_commit_timestamp)]
# summarizing the corrected timestamp column
# ... YOUR CODE FOR TASK 6 ...
corrected_log['timestamp'].describe()
TypeError Traceback (most recent call last)
in ()
6
7 # filtering out wrong timestamps
----> 8 corrected_log = git_log[(git_log['timestamp']>=first_commit_timestamp) & (git_log['timestamp']<=last_commit_timestamp)]
9
10 # summarizing the corrected timestamp column
/var/lib/python/site-packages/pandas/core/ops.py in wrapper(self, other, axis)
853
854 with np.errstate(all='ignore'):
--> 855 res = na_op(values, other)
856 if isscalar(res):
857 raise TypeError('Could not compare %s type with Series' %
/var/lib/python/site-packages/pandas/core/ops.py in na_op(x, y)
790 try:
791 with np.errstate(all='ignore'):
--> 792 result = getattr(x, name)(y)
793 if result is NotImplemented:
794 raise TypeError("invalid type comparison")
pandas/tslib.pyx in pandas.tslib._Timestamp.richcmp (pandas/tslib.c:19684)()
TypeError: Cannot compare type 'Timestamp' with type 'int'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.