whatstk.utils¶
Library generic utils.
whatstk.utils.chat_merge¶
Merging chats.
Functions
merge_chats(dfs) |
Merge several chats into a single one. |
-
whatstk.utils.chat_merge.merge_chats(dfs)[source]¶ Merge several chats into a single one.
Can come in handy when you have old exports and new ones, and both have relevant data.
Note: The dataframes must have an index with the timestamps of the messages, as this is required to correctly sort and merge the chats.
Parameters: dfs (List[pandas.DataFrame]) – List with the chats as DataFrames. Returns: pandas.DataFrame – Merged chat.
whatstk.utils.gdrive¶
whatstk.utils.exceptions¶
Library exceptions.
Exceptions
HFormatError |
Raised when hformat could not be found. |
RegexError |
Raised when regex match is not possible. |
whatstk.utils.utils¶
Utils.
Classes
ColnamesDf |
Access class constants using variable whatstk.utils.utils.COLNAMES_DF. |
-
class
whatstk.utils.utils.ColnamesDf[source]¶ Bases:
objectAccess class constants using variable
whatstk.utils.utils.COLNAMES_DF.Example
Attributes
DATEDate column MESSAGEMessage column MESSAGE_LENGTHMessage length column USERNAMEUsername column Access constant
COLNAMES_DF.DATE:>>> from whatstk.utils.utils import COLNAMES_DF >>> COLNAMES_DF.DATE 'date'
-
DATE= 'date'¶ Date column
-
MESSAGE= 'message'¶ Message column
-
MESSAGE_LENGTH= 'message_length'¶ Message length column
-
USERNAME= 'username'¶ Username column
-