Skip to content
Advertisement

Tag: data-manipulation

How to format query results as CSV?

My goal: Automate the operation of executing a query and output the results into a csv. I have been successful in obtaining the query results using Python (this is my first project ever in Python). I am trying to format these results as a csv but am completely lost. It’s basically just creating 2 massive rows with all the data

Advanced string manipulation in Python

I’m trying to get only the value that are after the string 2021 from the following string: I need to get those 2 values separated (first one has to be 168088000000 and the second one has to be 61271000000 in this case). They have to be preceded by 2021 (and the result should give only the 2 numbers I mentioned

Pandas Selection of rows not working propelry

I am trying to delete rows of a df which are not part of an other columns entry from another table. For further explanation: I have a table with transactions including materialnumbers and another table with production information also including materialnumbers. I want to delete every row where a materialnumber is contained which is not in the other table. My

How can I use value_counts() only for certain values?

I want to extract how many positive reviews by brand are in a dataset which includes reviews from thousands of products. I used this code and I got a table including percentaje of positive and non-positive reviews. How can I get only the percentage of positive reviews by brand? I only want the “True” results in positive_review. Thanks! Answer You

How to split data in a column into some separate columns in Python?

So, I have a data frame given below: I want to have the results in the og dataframe with some single line strings separately, such as [107.625764, -6.910353], [107.625871, -6.910358], split to 107.625764, -6.910353 . The detail of expected results are in the picture below. Expected Results All I know that we can apply str.split method with specifying any specific

Advertisement