Skip to content

Instantly share code, notes, and snippets.

View SahilFruitwala's full-sized avatar
🎯
Focusing

Sahil SahilFruitwala

🎯
Focusing
View GitHub Profile
@SahilFruitwala
SahilFruitwala / Delete-Files-Directories.py
Last active February 26, 2022 01:07
This gist is a codebase to delete files & directories using python.
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 = []
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):
@SahilFruitwala
SahilFruitwala / Data_Cleaning.py
Last active November 19, 2023 13:02
Data Cleaning Code
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'])