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
#!/usr/bin/env python | |
import os | |
import sys | |
import glob | |
import argparse | |
# Author Jani Päijänen | |
# Copyright (C) 2015 Jani Päijänen | |
# license: The MIT License (MIT). |
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 pandas as pd | |
import numpy as np | |
import os | |
def resample(filename, new_sample, header, index_col, usecols=None, separator=","): | |
df = pd.read_csv(filename, header=header, index_col=index_col, usecols=usecols, parse_dates=[0], sep=separator) | |
pd.set_option("display.precision", 3) | |
df.index = pd.to_datetime(df.index) |