chat_cleaning package¶
Submodules¶
chat_cleaning.discord module¶
Created on Fri May 15 18:05:19 2020
@author: alice
-
chat_cleaning.discord.
process_discord_chat
(filepath, order, timezone, pseudos=None)¶ Create a texts DataFrame from a Discord json file.
- Parameters
filepath (str) – filepath to discord json file.
order (list) – order of columns in exported file.
timezone (str) – user timezone at time of export.
pseudos (dict) – dictionary of real names to discord names of form {‘name’: ‘handle’}.
- Returns
dataframe containing cleaned data.
- Return type
ddata (pandas.Dataframe)
chat_cleaning.facebookmessenger module¶
Created on Sun Apr 19 14:13:52 2020
@author: alice
-
chat_cleaning.facebookmessenger.
process_facebook_chat
(filepath, order, timezone)¶ Create a texts DataFrame from all the Facebook Messenger json file in a designated folder.
- Parameters
filepath (str) – folder with facebook chats.
order (list) – order of columns in exported file.
timezone (str) – user timezone at time of export.
- Returns
dataframe containing cleaned data.
- Return type
fbdata (pandas.Dataframe)
-
chat_cleaning.facebookmessenger.
process_facebook_json
(filepath, order, timezone)¶ Create a texts DataFrame from a Facebook Messenger json file.
- Parameters
filepath (str) – filepath to fbmessenger json file.
order (list) – order of columns in exported file.
timezone (str) – user timezone at time of export.
- Returns
dataframe containing cleaned data.
- Return type
fbdata (pandas.Dataframe)
chat_cleaning.groupme module¶
Created on Sat Apr 11 23:53:27 2020
@author: alice
-
chat_cleaning.groupme.
process_groupme_chat
(filepath, order, timezone, pseudos=None)¶ Create a texts DataFrame from a GroupMe json file.
- Parameters
filepath (str) – filepath to groupme json file.
order (list) – order of columns in exported file.
timezone (str) – user timezone at time of export.
- Returns
dataframe containing cleaned data.
- Return type
gmdata (pandas.Dataframe)
chat_cleaning.opendb module¶
Created on Mon Aug 5 15:07:30 2019
@author: ABarbe Found on: https://stackoverflow.com/questions/305378/list-of-tables-db-schema-dump-etc-using-the-python-sqlite3-api
-
chat_cleaning.opendb.
to_csv
(filepath)¶ Converts a .db sqlite file to csv files for each database :param filepath: filepath of the database file. :type filepath: str
chat_cleaning.signal module¶
Created on Sat Apr 11 20:54:49 2020
@author: alice
-
chat_cleaning.signal.
get_recipient_ids
(threaddf, riddf)¶ Get the recipient ids of the participants in a signal chat
- Parameters
df (pandas.Dataframe) – dataframe of signal chat (either sms.csv or mms.csv df).
riddf (pandas.Dataframe) – dataframe of Recipient ids (from recipient.csv).
- Returns
dictionary of recipient IDs to name.
- Return type
riddict (dict)
-
chat_cleaning.signal.
process_signal_mms_chat
(filepath, ridfilepath, my_name, thread, order, timezone)¶ Create a texts DataFrame from a Signal csv file (should be mms.csv), the export of the mms table in the export database.
- Parameters
filepath (str) – filepath to sms csv file.
ridfilepath (str) – filepath to recipient csv file.
my_name (str) – my first name.
thread (int) – thread number of signal conversation.
order (list) – order of columns in exported file.
timezone (str) – user timezone at time of export.
- Returns
dataframe containing cleaned mms data.
- Return type
sdata (pandas.Dataframe)
-
chat_cleaning.signal.
process_signal_sms_chat
(filepath, ridfilepath, my_name, thread, order, timezone)¶ Create a texts DataFrame from a Signal csv file (should be sms.csv), the export of the sms table in the export database.
- Parameters
filepath (str) – filepath to sms csv file.
ridfilepath (str) – filepath to recipient csv file.
my_name (str) – my first name.
thread (int) – thread number of signal conversation.
order (list) – order of columns in exported file.
timezone (str) – user timezone at time of export.
- Returns
dataframe containing cleaned sms data.
- Return type
sdata (pandas.Dataframe)
chat_cleaning.whatsapp module¶
Created on Sat Apr 11 22:59:42 2020
@author: alice
-
chat_cleaning.whatsapp.
process_whatsapp_chat
(filepath, order, pseudos=None)¶ Create a texts DataFrame from a whatsapp txt file.
- Parameters
filepath (str) – filepath to whatsapp txt file.
order (list) – order of columns in exported file
- Returns
dataframe containing cleaned data.
- Return type
wadata (pandas.Dataframe)