Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
1 vote
2 answers
48 views

data frame breakdown by year, rounding up by duration of each period

I have a data frame of county executives and the first and last years they served. I am running a panel study with county-year as the unit of analysis. The date range is 2000 to 2009. I will like to ...
YouLocalRUser's user avatar
1 vote
2 answers
37 views

dataframe breakdown by year

I have a dataset on county executives and their year of inaguration. I need break down which year each executive was inaugurated. The problem is that the notation under the "year" variable ...
YouLocalRUser's user avatar
1 vote
2 answers
65 views

getting the latest date for a a duplicated item in r [closed]

I have the following dataset (below). I am trying to get the latest SEnd value for each individual tag (see Desired output) where I have the Tag, Owner and the latest SEnd date only. Essentially I am ...
pat's user avatar
  • 105
1 vote
3 answers
55 views

Python Pandas: update last dates values of parameters with simple dynamics grouped by id

Here's a dataframe, with some parameters for each id by some regular quarterly dates. It's originally shuffled randomly, but, at first, let say, it is sorted by fab_date and id. import pandas as pd np....
Howdyouride's user avatar
0 votes
1 answer
36 views

Count unique individuals in each month [duplicate]

I have a dataframe that looks something like this: data.frame( stringsAsFactors = FALSE, species = c("species1","species1", "species1",...
luciano's user avatar
  • 13.7k
0 votes
2 answers
54 views

Return the name of a column which matches a date value

I have a data.frame with about 66k rows and 150 columns. For the purposes of this question, this is a sample. All columns are date objects. structure(list(fixed_date = structure(c(19267, 19239, 19120, ...
Alejandro Carrera's user avatar
0 votes
1 answer
32 views

thermal sum between two dates, from a daily data frame

I have a data frame with daily temperature data. I would like to calculate the sum in several columns, between two dates from a second data frame and create a output (results) in a new data frame.The ...
Marcel 's user avatar
  • 195
0 votes
2 answers
40 views

Average and sum between two dates, from a daily data frame

I have a data frame with daily temperature data. I would like to calculate the average between two dates from a second data frame and add the results in a new column. The average temperature must be ...
Marcel 's user avatar
  • 195
-1 votes
1 answer
32 views

Select most recent date in a panel RStudio

I have a data frame which is a panel: I have different CLPs (it's like the ID of an event) repeated several times, one for each phase of the event: organization, set-up, start, end, clean-up. Each ...
Andrea Stringhetti's user avatar
0 votes
1 answer
41 views

Filter Multiple Items on Different Conditions using pandas

I am attempting to filter a dataframe index based on two conditions, ID and DATE, where DATE will vary by ID. An example of what would be filtering on, I have provided 'filt' Is there a better way to ...
ktj1989's user avatar
  • 797
2 votes
2 answers
95 views

How to connect data points with line, where values are missing

I need to draw several biomarker changes by Date on one graph, but biomarker samples were measured in different dates and different times, so for example: data = { 'PatientID': [244651, 244651, ...
asi's user avatar
  • 25
0 votes
2 answers
46 views

How to handle duplicates using asfreq() function. Is there any other way to do this?

I have some hourly data on electricity generation from various sources in various countries. I download data from the ENTSO-E Transparency Platform website and found a problem with data inconsistency. ...
g3nkoVMAESTRO's user avatar
1 vote
2 answers
57 views

Create new date columns based on matching vector

I am trying to simulate visit schedules for participants in a study. I will start with a dataframe of participants and first visit dates, and my goal is to create columns with the dates of later ...
gxq9's user avatar
  • 13
1 vote
3 answers
89 views

Counting number of days from event, till another event in R

data.frame( scrape_date = as.Date(c("2023-01-01", "2023-01-02", "2023-01-03", "2023-01-04", "2023-01-05", "2023-01-06", "2023-01-07&...
James Madds's user avatar
0 votes
1 answer
26 views

How do I do right join with multiple conditions?

I have an example below where I need to perform a right join with multiple conditions: 1st dataframe: df_1 <- data_frame( dates = c(as.Date("2023-03-01"), as.Date("2023-03-05")...
newt335's user avatar
  • 199

15 30 50 per page
1
2 3 4 5
91