Last active
July 28, 2016 06:07
-
-
Save txthai/f2d9b7236d57195e13d206c7fdacc008 to your computer and use it in GitHub Desktop.
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
def save_data(df, directory, ticker_symbol, start_date, end_date, file_extension): | |
sdt = strip_hyphens(start_date) | |
edt = strip_hyphens(end_date) | |
filename = directory + ticker_symbol + '_' + sdt + '-' + edt + file_extension | |
df.to_csv(filename, index_label="Date") | |
def strip_hyphens(s): | |
return s.replace("-", "") | |
if __name__ == "__main__": | |
pull_data() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment