Skip to content

Selective summation of columns in a pandas dataframe

The COVID-19 tracking project (api described here) provides data on many aspects of the pandemic. Each row of the JSON is one day’s data for one state. As many people know, the pandemic is hitting different states differently — New York and its neighbors hardest first, with other states being hit …

Query to join two tables with like operator

I have two table which has data as below Table1 I would like to create where clause to get rows with like operator. for ex. But my problem is that there are more than 15-20 different parameter in where clause, it can also increase latter. So I have decided to create a new table in database lets called it Tabl…

Compare values in Different column and row

I have the following table: What I need is to select all rows where Col1 value is available in Col2 and vice versa. This case only ROW 4 or ROW 3 should be returned. They have same values (13 17). Take it as col1 is Buyer and col2 is Seller I want to know who are the users who bought