Skip to content

Tag: python-3.x

loop over rows of csv and put inside code

I am trying to read 5 columns from a 6 column csv data and use each row in a formula and itarete for all the rows. the file is csv file is something like this with hunderds of rows when I put values by hand it works all in well. However, when I put the df columns to do it

How to handle an error and make it a result

I’m checking whether the TikTok live video is (live now) or (ended). Since it is hard to deal with TikTok a bit, I will make a sign and rely on it. The following code will take the TikToker username. If there is a live video running, it will show the viewers count, so we decide that it is (live now).

How to use urlparse in python pandas

Here is my code for getting domain name from string: I don’t know how to use this method in pandas. Here is my pandas dataframe: I tried this code but didn’t work: getting this error: Answer A simple solution would be to use Series.apply

How to make list numbers by formula

hey everyone i have a question how i make a formula that makes my numbers in list specific first i need it to start whith number 4 then if if its higher than 6 it needs to restart from 0 it would look like this 4 5 6 0 1 2 3 4 5 6 0 1 2 3 4