Created
September 26, 2015 21:07
-
-
Save kapadia/4f178114dd8ce2a26d1c to your computer and use it in GitHub Desktop.
List objects not updated since Aug 25
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import pandas as pd | |
from datetime import datetime | |
def get(srcpath): | |
df = pd.read_csv(srcpath, delim_whitespace=True, names=['date', 'time', 'bytes', 'name']) | |
df['date'] = pd.to_datetime(df['date']) | |
start_date = datetime(2015, 8, 25) | |
df[df['date'] < start_date]['name'].to_csv(sys.stdout, index=False) | |
if __name__ == '__main__': | |
get(sys.argv[1]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment