Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
50 views

I have a data frame that looks like Date Student_ID Exam_Score 2020-12-24 1 79 2020-12-24 3 100 2020-12-24 4 88 2021-01-19 1 100 ...
Ishigami's user avatar
  • 592
1 vote
1 answer
121 views

I have a pandas df that needs to be cleaned by filling nulls in city_id and address_type fields: City_ID Date State City Address_type 1001 10/1/24 Texas Houston House 1001 10/1/24 Texas Houston House ...
databaseBoss's user avatar
1 vote
1 answer
66 views

I have a polars dataframe, and for some of the columns I want to count the number of "-1" (if character) and -1 (if numeric). I would like to really make this a fast query, so I'm very ...
EnFiFa's user avatar
  • 65
2 votes
3 answers
107 views

I have a Pandas dataframe that looks like df = pd.DataFrame([['John', '1/1/2017','10'], ['John', '2/2/2017','15'], ['John', '2/2/2017','20'], ['...
Ishigami's user avatar
  • 592
0 votes
1 answer
34 views

I have a question related to the SQL query. The data looks like this: Name1 Name2 Category Total ABC NULL Category1 100 DEF ABC Category1 20 GHI ABC Category3 300 XYZ DEF Category2 60 XYZ GHI ...
TTT's user avatar
  • 3
2 votes
2 answers
71 views

I have a table invitations keeping for each user the email invitations he received. One user can have many emails, on each email can be received many invitations. create table invitation ( user_id ...
Dacian's user avatar
  • 710
1 vote
2 answers
204 views

I'm using postgresSQL and would like to find the minimum value and the maximum value in one column. I have to have a column titled Order ID, Minimum Order, Maximum Order in the query. See the below ...
stella1897's user avatar
0 votes
2 answers
66 views

I have a complex dataframe with multiple columns. All of them being MultiIndex based. At some point I wanted to be quite specific when it comes to estimating some metrics so I started experimenting ...
Manu's user avatar
  • 102
1 vote
2 answers
98 views

I have a pandas dataframe like as below data = { 'cust_id': ['abc', 'abc', 'abc', 'abc', 'abc', 'abc', 'abc', 'abc', 'abc', 'abc'], 'product_id': [12, 12, 12, 12, 12, 12, 12, 12, 12, 12], '...
The Great's user avatar
  • 7,783
1 vote
2 answers
80 views

This is my DataFrame: import pandas as pd df = pd.DataFrame( { 'group': list('xxxxyyy'), 'open': [100, 150, 200, 160, 300, 150, 170], 'close': [105, 150, 200, 160, 350, 150,...
AmirX's user avatar
  • 2,679
0 votes
1 answer
74 views

Consider the following relational schema: candidates (candidate_id, skill) [Sample input table] Select candidate_id from candidates group by candidate_id having sum(if(lower(skill)='python' or lower(...
Suhail's user avatar
  • 1
1 vote
2 answers
71 views

I have a PostgreSQL table: create table test(type_id, m_id)as values (1, 123) ,(2, 456) ,(3, 123) ,(4, 123) ,(2, 456) ,(1, 789) ; Basically, one m_id could have ...
Fisher Coder's user avatar
  • 3,648
0 votes
1 answer
70 views

my base data: Process ID Location Date Timeliness 2030608 New York May 24 in time 2067393 Ohio May 24 overdue 1329306 Ohio May 24 in time 1740814 Ohio June 24 overdue 1924676 Chicago May 24 overdue ...
atwerq's user avatar
  • 3
0 votes
3 answers
107 views

I have following 2 tables: Sales and Menu. SALES TABLE customer_id product_id A 1 A 2 A 2 A 3 A 3 A 3 B 1 B 1 B 3 B 3 B 2 B 2 C 3 C 3 C 3 MENU TABLE product_id product_name 1 sushi 2 curry 3 ramen **...
Farha Mansuri's user avatar
1 vote
1 answer
60 views

I have a multiindex Pandas DataFrame and I'm using groupby to extract the rows containing the first appearances of the first index. After this operation, however, the output column values does not ...
user1477337's user avatar
2 votes
3 answers
149 views

Consider the following dataframe, where Date is in the format DD-MM-YYY: Date Time Table 01-10-2000 13:00:03 B 01-10-2000 13:00:04 A 01-10-2000 13:00:05 B 01-10-2000 13:00:06 A 01-...
NC520's user avatar
  • 407
0 votes
3 answers
70 views

I have a dataframe that shows details about employees and the site they are at and the positions they have held. The dataframe has columns for Site Id, Employee ID, and StartDate (plus a lot more ...
Bijan's user avatar
  • 8,816
0 votes
1 answer
54 views

If the Value '2235' is in column 'Age', the associated Group in the Column 'Name' should be set for all true in a new Column. My Test-Dataframe is: import pandas as pd # intialise data of lists. data ...
mxplk's user avatar
  • 109
0 votes
0 answers
52 views

I want to compare the numerical value of each row of groups with the previous rows of the same group and return the number of previous rows that have a value greater than the current row. I know the ...
hadi ahmadi's user avatar
1 vote
1 answer
69 views

I want to Group BY Date and Payment and branch name and code I don't know why this SQL query return this error: Column 'FactSalesTable.SalesTotal' is invalid in the select list because it is not ...
Ahmed's user avatar
  • 25
0 votes
1 answer
45 views

CONTEXT I want to group by both a rule_id and calc_id and transform multiple columns into one row where each variable is concatenated with a ",' DATA EXAMPLE Calc_ID Rule_ID Name Tracked?...
KL_'s user avatar
  • 331
0 votes
2 answers
149 views

I have a dataframe that looks like Class_ID Student_ID feature 1 4 31 1 4 86 1 4 2 1 2 11 1 2 0 5 3 ...
Apook's user avatar
  • 449
0 votes
1 answer
158 views

I'm working with a large dataset in MongoDB where I need to group approximately 15 million records by a specific field (name). The goal is to find all records where the name field is duplicated. I'm ...
Mohit Kumar's user avatar
1 vote
2 answers
176 views

I'm Trying to make Sql TRANSFORM with calculation time in column in and out. I want the answer in 1 query and I don't want to use the function in ms access because I want to use the sql in vb.net ...
dlaksmi's user avatar
  • 213
0 votes
0 answers
123 views

I have dataframes for which I want to group relatively close values of a column. I tried using percentile but often there are huge differences between values in a group. I.E. column has 1000 values ...
David Xiao's user avatar

1
3 4
5
6 7
740