WhatsApp Data Analysis using Python | Python Data Analysis projects

preview_player
Показать описание

✅ Support My Channel Through Patreon:
✅ One-Time Contribution Through PayPal:
✅ Become a Channel Member:
✅ Buy Me A Coffee:

 #Python #DataScience #MachineLearning #PythonProjects #WhatsApp
Рекомендации по теме
Комментарии
Автор

Hi friend! You know if this format 2/9/20, 8:19 PM, i can to apply this pattern of re ' \d{2}-\d{2}-\d{2}, \s(\d{2}\:\d{2}\s(?:AM|PM|))'? I think that by solving this, we could solve the problem of data output in 0. Greetings!

alfredopaz
Автор

This has been extremely useful, THANK YOU!

sylviamonicakalemera
Автор

Your code is not working.Please let me know what is problem.

jayjethva
Автор

Hi,
I have a question. I am also working on a specific whatsapp chat data analysis. I have formed four columns - date, time, user and message. Except time i changed all the datatypes from objects to date(datetimens[64]), User(string), message(String). Time is in object data type and showing like this 6.30 am, 3.30 pm and so on. Should i convert this time from object data type to string and then 24 hour time format? How to go about it. Please suggest

janakiyeluripati
Автор

for example, how would you arrange the pattern for like this

[2021-03-25, 19:22:05] ‪+94 77 89 5476‬: Thank u

ireshmeconi
Автор

Can we use telegram data for the above project??

gouthamikarshikalam
Автор

Hi Afiz I am Emre how 're u ? Thank you very much for your work

I have a problem, when i run the code "output: [ ]" i get this problem..
I tried all the ways but I could not :(
Can you help me? please

Greetings from Turkey

Cedric-ftrs
Автор

Hi @afiz, I too am getting no data when I use the regex you have shared below and in the video .
Can you please let me know how we can get in touch, to resolve this issue, Looks like I can learn a lot from you.

mohitrocksify
Автор

Sir it show Total number of Images + Videos Shared: 0
Total Group Notifications: 0, Sir what's the reason?

abidtasleem
Автор

for this example, how would you arrange the pattern


[12/08/2017 00:29:32] Fabrizio Grasso: Good morning

fabriziograsso
Автор

getting error as below:
i tried to change the date format as well

ValueError: time data '1/4/20, 17:26 - ' does not match format '%d/%m/%Y, %H:%M - ' (match)

user_message:
['Messages and calls are end-to-end encrypted. No one outside of this chat, not even WhatsApp, can read or listen to them. Tap to learn more.

message_dates:
['1/4/20, 17:26 - ', '1/4/20, 16:11 - ', '1/15/20, 10:54 - ', '1/15/20, 10:55 - ', '1/20/20, 08:51 - ', '1/20/20, 14:50 - ', '1/20/20, 15:02 -

code:

import re


import pandas as pd



#Read text from the file and split it by new line

with open(file_r, encoding = 'utf-8') as f:
data=f.read()

#print(data)


#separate user messages and datetime of the chat

pattern = '\d{1, 2}/\d{1, 2}/\d{2, 4}, \s\d{1, 2}:\d{2}\s-\s'
user_messages = re.split(pattern, data)[1:]
message_dates = re.findall(pattern, data)
print(user_messages)
print(message_dates)



## load user messages and dates into dataframe
df = pd.DataFrame({'user_message':user_messages, 'message_date': message_dates})
# convert message_date type
df['message_date'] = pd.to_datetime(df['message_date'], format='%d/%m/%Y, %H:%M - ')

'date'}, inplace=True)


valueError: time data '1/4/20, 17:26 - ' does not match format '%d/%m/%Y, %H:%M - ' (match)

gjangale
Автор

What's the regex for 3/31/21, 14:39

gaurav.anirbandutta
Автор

some please help me the changes to be made. the date format is dd/mm/yyyy hr:mm

subhashp
Автор

@Afiz the code is not showing any output. The Exported File is also without any media. Please Help

ostwalaman
Автор

Hello, I'll like to know if it's possible to extract the contacts instead of username

kellyjane
Автор

bro help me out....this code is currently not

balaji
Автор

Afiz nice work can u teach me one to one I can pay you for your class.

maheshbhimashankartengli
Автор

I am getting prbl can anyone suggest Regex for dd/mm/yy, hh.mm am or pm

abhaychaudhari