Skip to main content
Filter by
Sorted by
Tagged with
0 votes
2 answers
95 views

We have got a table with a identifier, a key/value pairs and a start and end timestamp which indicates the valid period for the values. MASTER_WORK_ORDR_ID START_TS END_TS WORK_ORDR_ID_CTXT ...
L.P.'s user avatar
  • 3
1 vote
5 answers
86 views

I use Postgres on my web server in order to record incoming queries into a table calls2, basically writing a single row each time with lots of repeating information, such as a date field ("when&...
Thomas Tempelmann's user avatar
3 votes
3 answers
180 views

Hopefully the title is reasonably intuitive, edits welcome. Say I have this dataframe: df = pd.DataFrame({'x': ['A', 'B', 'B', 'C', 'C', 'C', 'D', 'D'], 'y': [None, None, 1, 2, 3, 4,...
Hendy's user avatar
  • 10.7k
1 vote
2 answers
96 views

I have a dataset called TotalPhosphorus, and I want to assign seasons to each observation. However, I need the winter season to include December from the previous year and January–March from the ...
Daniela's user avatar
  • 17
1 vote
1 answer
56 views

I have an in - memory DolphinDB table created as follows: ticker = `AAPL`IBM`IBM`AAPL`AMZN`AAPL`AMZN`IBM`AMZN volume = 106 115 121 90 130 150 145 123 155; t = table(ticker, volume); t; The output of ...
Dongyun Huang's user avatar
0 votes
1 answer
89 views

I have noticed that although df %>% group_by(firm) %>% arrange(week) %>% mutate(lag_sales = lag(sales)) %>% ungroup() ignores the grouping but calculates the correct lags as the ...
ZayzayR's user avatar
  • 307
0 votes
0 answers
27 views

I have a dataset populated from an API call to Splunk. The dataset contains the following: time destip destport transport 2025-09-17 22:03:09 172.16.5.1 53 UDP 2025-09-17 22:03:10 172.16.5.1 53 UDP ...
Jhowel's user avatar
  • 63
4 votes
0 answers
137 views

I’m storing IoT readings in a GridDB container and need one row per hour with the true average of the points that actually fall inside each hour (not interpolated values): ts_bucket ...
Badhon Ashfaq's user avatar
1 vote
1 answer
109 views

I have a polars dataframe that I want to group by and concatenate the unique values in as a single entry. in pandas, I go: def unique_colun_values(x): return('|'.join(set(x))) dd=pd.DataFrame({'...
frank's user avatar
  • 3,816
1 vote
2 answers
99 views

I have a dataframe df made up of n columns which are groups and one, "data". This dataframe is then grouped on the n group columns. df = pd.DataFrame(data={"g0": ["foo", ...
Aristide's user avatar
7 votes
3 answers
438 views

I am trying to do a somewhat complicated group and sort operation in pandas. I want to sort the groups by their values in ascending order, using successive values for tiebreaks as needed. I have read ...
Jessica's user avatar
  • 1,813
0 votes
2 answers
69 views

I'm trying to create a list of contracts that expire by dates. I looked on the many sites for a solution. I have a measure that calculates the date and i need calculated table with a summurazed ...
Pat N.'s user avatar
  • 47
2 votes
2 answers
86 views

We're trying to group up date counts by month and index values are returning as decimals instead of integers when series contain any number of NaTs / na values. Simplified reproducible example: import ...
Chris Dixon's user avatar
  • 1,148
0 votes
1 answer
32 views

I'm encountering some issues when trying to perform grouped correlation calculations in DolphinDB. Here's my scenario: I'm using DolphinDB to calculate correlations between multiple columns in a table....
RORO's user avatar
  • 1
1 vote
2 answers
104 views

I’m working with time-series data in SQL Server and need to retrieve the last valid value for each day. A valid value is defined as one that is non-null and not zero. The challenge is that data points ...
vishal_gosai's user avatar
1 vote
1 answer
69 views

What I'm currently doing is this: SELECT time_bucket('60 min', raw_data.timestamp) AS time_60min, COUNT(raw_data.vehicle_class) AS "count", raw_data.vehicle_class AS "...
PhilippR's user avatar
2 votes
1 answer
282 views

I recently had to update the virtual environment for one of my libraries from Python 3.7 to 3.10, which also involved updating Pandas from 1.1.5 to 2.3.0. In the previous virtual environment, this ...
Jan Stuller's user avatar
0 votes
1 answer
77 views

I have a database of music manuscripts that looks like the below diagram. A 'Source item' belongs to a certain manuscript (source). A source item is then categorized as EITHER a 'Section' of a 'Piece' ...
tapemachine86's user avatar
2 votes
1 answer
53 views

Suppose I have this: ISresult = h25.groupby(['month','impactedservice']).agg({'resolvetime': ['count','median','mean', 'min', 'max','std']}) The column list looks like this: [('resolvetime', 'count'),...
Mark G's user avatar
  • 97
0 votes
3 answers
120 views

I would like to extract the MIN and MAX from multiple columns (start_1, end_1, start_2, end_2) group by "Name" I have data that looks like this: start_1 end_1 start_2 end_2 name 100 ...
soosa's user avatar
  • 165
0 votes
1 answer
95 views

BigQuery has a newly GROUP by grouping set [1]. It is syntax simpler than the traditional Group By Union approach. I wonder if it also performs much better, because grouping set only scan the source ...
Hui Zheng's user avatar
  • 3,247
0 votes
2 answers
80 views

Following is my table. I want to sum across all different combinations and put the sum in separate columns, not in the same column. data: Subject Var1 Var2 Var3 Var4 Constant1 Constant2 ONE 1 2 1 1 A ...
user10969476's user avatar
1 vote
3 answers
91 views

How can I perform a GROUP BY in SQL when the group_name values are similar but not exactly the same? In my dataset, the group_name values may differ slightly (e.g., "Apple Inc.", "...
Ahamad's user avatar
  • 1
1 vote
2 answers
62 views

I am trying to figure out how to code a reverse look up in pandas dataframe using groupby and looking for the owner of a max time. ` import pandas as pd df = {'Name': ['Mike', 'Lilly', 'Frank', 'Jane',...
Tim Romero's user avatar
0 votes
0 answers
39 views

I am calculating the First Time Resolution (FTR) percentage from call logs using the following Python code with pandas and numpy. When I run the code on one CSV file (calls_logs_cleaned_2025-05-02.csv)...
IAIMT2024's user avatar

1
2 3 4 5
740