Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python filter timestamp

In [115]:

df[(df['dt'] > '2014-07-23 07:30:00') & (df['dt'] < '2014-07-23 09:00:00')]
Out[115]:
                       dt  value
index                           
91    2014-07-23 07:35:00  0.300
92    2014-07-23 07:40:00  0.300
93    2014-07-23 07:45:00  0.216
94    2014-07-23 07:50:00  0.204
95    2014-07-23 07:55:00  0.228
96    2014-07-23 08:00:00  0.228
97    2014-07-23 08:05:00  0.228
98    2014-07-23 08:10:00  0.228
99    2014-07-23 08:15:00  0.240
100   2014-07-23 08:20:00  0.228
101   2014-07-23 08:25:00  0.216
102   2014-07-23 08:30:00  0.228
103   2014-07-23 08:35:00  0.324
104   2014-07-23 08:40:00  0.336
105   2014-07-23 08:45:00  0.324
106   2014-07-23 08:50:00  0.324
107   2014-07-23 08:55:00  0.324
Comment

PREVIOUS NEXT
Code Example
Python :: tty escape 
Python :: new dataframe based on certain row conditions 
Python :: What is role of ALLOWED_HOSTs in Django 
Python :: python array index range 
Python :: How to select parts of a numpy array 
Python :: sort rows by values dataframe 
Python :: write a file python 
Python :: python not equal multiple values 
Python :: xargs to copy file from text files to another directory 
Python :: Python NumPy swapaxis Function Example 
Python :: how to make convert numpy array to string in python 
Python :: python loop opening file from directory 
Python :: Exit code: ENOENT. spawn /usr/bin/python ENOENT 
Python :: how to concatenate a string with int in python 
Python :: print in python without using print 
Python :: convert all colnames of dataframe to upper 
Python :: python datetime compare date 
Python :: dataframe to tf data 
Python :: raku fib 
Python :: Exception Value: Object of type User is not JSON serializable 
Python :: scatter matrix plot 
Python :: python import graphviz 
Python :: python append csv to dataframe 
Python :: sum with conditional python 
Python :: add key if not exists python 
Python :: continue vs pass python 
Python :: sum of 1 to even numbers in python 
Python :: pandas head sort by colun name 
Python :: python dictionary append value if key exists 
Python :: python icon on task bar 
ADD CONTENT
Topic
Content
Source link
Name
7+7 =