python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
How to transfer a set of rows to the end of the first row with conditional in a data frame
I need to have all the rows of each participant in a single row because I want to run a repeated measures Anova.
The data frame I have now:
eyetracking <- data.frame(
participant = c("s001&q...
Olivia
Votes: 0
Answers: 1
Drop interval of rows in a dataframe based on the value of an object
I am trying to drop intervals of rows in my Dataframes from the maximal value (exclusive) to the rest (end) of the column. Here is an example of one of the column of my df (dflist['time']):
0 0.00...
Clément Chéry
Votes: 0
Answers: 1
np keep rows contain specific value python
I have a 2D numpy array, how can I keep only rows that contain a specific value, and then flatten the array keeping only unique values.
array([[0, 2],
[1, 3],
[2, 4],
[3, 5],
...
user18628648
Votes: 0
Answers: 1
select multiple separately columns by iloc in pandas
my file contains 15 columns and 10 rows.
I want to select some columns between them like this (1:5 and 7:11 and 13:15).
I wrote it similer to:
'df.iloc[: ,[1:6,7:12,13:]]'
or
'df.iloc[: ,[[1:6],[7:12...
vahid vhr
Votes: 0
Answers: 1