Skip to content

Tag: python

I can’t check broken images from a url

I am trying from a basic code from python to be able to verify the images that are broken, but I do not know how to do it this is the code i am using: Can someone help me! Thank you very much! Answer There are a couple of things that needs to be done to verify if a file

split on delimeter and ignore a pattern

I would like to split a string based on a delimiter and ignore a particular pattern. I have lines in a text file that look like so I would like to split on “|” but ignore 0 and 567 and grab the rest. i.e whenever I split, its grabbing the two numbers as well. now numbers can occur in other

Pandas: filter on grouped and aggregated dataframe

I have a dataframe which is based on a read-in excel list. The data has multiple columns and rows with one unique identifier. I want to plot the data through a PyQT interface based on some user selection (checkboxes), but I cannot select one unique row for plotting. The data looks like this: After I get this:…

Get variables from function input and text after

So id like to make varibles from my function input So basically, the if statement should check if the varible is True or not. And i want to use the function input + ”-outcome” to check. Here is an example, to make you understand my problem better! I’ve tried to find a solution but don’t find it anywhere Thank…

pandas split values in column

I’m new to pandas (version 1.1.5) and have tried str.split() and str.extract() to split column POS of numerical values with no success. My dataframe is about 3000 lines and is structured like this (note _ and – delimiters in subset): I would like for the dataframe to look like this (i.e. retain va…