Skip to content

Instantly share code, notes, and snippets.

@aniruddha27
Created August 15, 2020 05:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aniruddha27/c0321317928e030224016bc65ca543b4 to your computer and use it in GitHub Desktop.
Save aniruddha27/c0321317928e030224016bc65ca543b4 to your computer and use it in GitHub Desktop.
# Create
data_tweet = DbConnect("SELECT User_Id, Tweet_Id, Tweet FROM TwitterTweet;")
df_tweet = pd.DataFrame(columns=['User_Id','Tweet_Id','Clean_Tweet'])
for data in data_tweet:
index = len(df_tweet)
df_tweet.loc[index,'User_Id'] = data[0]
df_tweet.loc[index,'Tweet_Id'] = data[1]
df_tweet.loc[index,'Clean_Tweet'] = preprocess(data[2])
df_tweet.head()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment