Skip to content

Tag: python

Telegram checking and adding to contacts?

I need your help. I had 40k of mobile numbers and i need to do few things: Check if this numbers have tg account Add this account to contact list. Can anybody helps me, how i can do it. Or with examples of codes. Thanks Answer if you are using pyrogram, To check if the entity has a telegram account

Accessing Json object values with the Help of a dictionary

I’ve a huge json file which has a lot of nested key value pairs. So I thought I should save the keys as dictionary values and use that dictionary values as keys to access the values from the json file. Say for example: so I thought to access the key morning value, instead of writing I should keep a dict…

Extracting features from dataframe

I have pandas dataframe like this For example if “ex” start to 533,535,545 new variable should be : Sample output : How can i do that ? Answer You can use np.where: Update You can also use your Phone column directly: Note: If Phone column contains strings you can safely remove .astype(str).

Identifying common elements in a list of words

I have list of words in a column where I need to find common elements. For example, list contains words such as, sinazz31 sinazz12 45sinazz sinazz_84 As you can see, the common element is “sinazz”. Is there a way to develop an algorithm in Python to identify such common elements? If the length of the words ar…