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 shutil | |
import os | |
def delete_temp_file(locations): | |
for location in locations: | |
try: | |
# get list of all files and directories | |
file_dir = os.listdir(location) | |
only_files = [] |
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
from tweepy.streaming import StreamListener | |
from tweepy import OAuthHandler | |
from tweepy import Stream | |
class TwitterStreamer(): | |
""" | |
Class for streaming and processing live tweets. | |
""" | |
def __init__(self): |
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 | |
""" | |
Data Loading | |
""" | |
# df = pd.read_csv('my_file.csv') | |
# df = pd.read_csv('my_file.csv', delimiter=',') | |
# df = pd.read_csv('my_file.csv', delimiter=',', header=None) | |
df = pd.read_csv('my_file.csv', delimiter=',', header=0, names=['Id','Name', 'Type', 'Price']) |