Can you filter with in a groupby function in pandas?

Hello Stackoverflow Community, I was wondering if it is possible to filter with in a groupby function in pandas and the reason why is because I want to find out for each gender what is the total number of mobile users. In my dataset we have a Boolean column named mobile where if a customer… Read More Can you filter with in a groupby function in pandas?

Count algorithm

I am looking for an algorithm that counts a given number of states in Python. There is a string like this: 10?01?011 with "0, 1, ?" it was made. The question mark can be 0 or 1. The program should enumerate all the states that question marks can have in a string. For example, in… Read More Count algorithm

How to use an ARRAYFORMULA to count how many rows there are untill I get a specific value at multiple times?

I’m a beginner with google sheets/exel formulas so i’m having trouble to count how many rows there are until I get a specific value, and this, multiple times in a same column. Example bellow, I would like to set an ARRAYFORMULA in B1 so I can get those results: Row\Column A B 1 Value Result… Read More How to use an ARRAYFORMULA to count how many rows there are untill I get a specific value at multiple times?

What is the difference between two codes that count words in a text?

Hello I was trying to count words in a text but there’s a problem. If I write code like def popular_words(text:str, list:list)-> dict: text=text.lower() splited_text=text.split() answer={} for word in list: answer[word]=splited_text.count(word) return answer print(popular_words(”’ When I was One I had just begun When I was Two I was nearly new”’, [‘i’, ‘was’, ‘three’, ‘near’])) ‘… Read More What is the difference between two codes that count words in a text?

Highlight row using conditional formatting if duplicate in two different columns of same row in Google Sheets

I apologize if this has been asked before, I tried searching but couldn’t find exactly what I’m looking for. I want to highlight rows in Google Sheets using conditional formatting if two different rows have duplicate data in column E, and they also have duplicate data in column F. I’m currently using =AND(countif($E:E,$E1)>1,countif($F:F,$F1)>1) which seems… Read More Highlight row using conditional formatting if duplicate in two different columns of same row in Google Sheets