whatsapplib
v0.0.5
顾名思义,这是WhatsApp组聊天分析软件包。它基本上将帮助程序员从WhatsApp组聊天中生成视觉见解。您不需要做任何事情,只需导出组聊天,然后使用此软件包来生成或创建漂亮的不同不同图表。在这里,您不必担心任何事情,它在内部会为您带来一切。它将执行ETL(提取转换载荷) ,并最终以视觉效果的形式生成洞察力。大约有。有15种以上的方法可用来帮助您生成洞察力,即使您可以下载每个洞察力。
链接:https://pypi.org/project/whatsapplib/0.0.5/
这些方法在下面列出:
使用软件包管理器PIP安装所有要求。只需按照以下命令:
pip install WhatsappLib==0.0.5
请记住:您的数据必须以下面的形式如下所述,如果不是,请尝试以给定格式转换数据。是的,如果将您的时间段指定为am'&'pm'格式,则需要在较低案例'am'&'pm'格式中更改它们。我将解决此问题并尽快更新此软件包。

# importing the required libraries
from WhatsappLib . whatsapplib . preprocess import analysis
# you need to do just one simple step, create object of Analyzer class and pass location-
# of directory as parameter which is mendatory.
obj = analysis ( r'*Sample.txt' )
# Now use this reference variable (obj) to access this methods.
total_users , total_messages , media_messages , links = obj . basicStats () # it is returning 4 parameters
print ( 'Total No. of users : ' , total_users )
print ( 'Total No. messages sent : ' , total_messages )
print ( 'Total No. of media messages sent : ' , media_messages )
print ( 'Total No. of link shared : ' , links )
obj . wordCloud_in ( user = '+91 83900 8' , save_fig = 'y' )
obj . mostActiveUsers ( save_fig = 'y' )
obj . mostActiveDay ( save_fig = 'y' )
obj . topMediaContributor ( save_fig = 'N' )
obj . maxWordContributers ( save_fig = 'y' )
obj . maxURLContributers ( save_fig = 'N' )
obj . mostActiveTime ()
obj . mostSuitableHours ( save_fig = 'y' )
obj . highlyActiveDates ( save_fig = 'N' )
obj . timeseriesAnalysis ( save_fig = 'y' )
obj . activeMonthsB ( save_fig = 'N' )
obj . maxEmojiUsers ( save_fig = 'y' )
obj . activeMonthsT ()
obj . trafficPerYear ( save_fig = 'N' )
obj . weekdaysTraffic ( save_fig = 'y' )
top_emojis = obj . topEmojis_G () # returning pandas dataframe
obj . saveDatframe () # saving the dataframe
top_emojis_i = obj . topEmojis_I ( '+91 81*** 00***' ) # returning pandas dataframe
# Again Note :) : In some methods you need to pass "User" as a parameter which is mandatory, some methods-
# are taking "save_fig" parameter to save the figure in current directory, which is optional, if you want to-
# download the figure or plot you can tweak the parameter.样本输出:




这是我对Python社区的小型开源贡献。随时在LinkedIn上连接我。要查看我惊人的博客,请单击此处。
由罗尼尔制成的