Questions tagged [drop]
468 questions
-1
votes
1 answer
How do I access both the drag and drop element in HTML?
The 'dragenter' event fires when a dragged element enters a drop element. This event is attached to the drop element, so I can access that. Where is the dragged…

Anthony
- 158
- 1
- 7
-1
votes
1 answer
Dropping rows where number of cases is greater that population size
I have merged health data (cases) with population data. In some instances, the number of cases (n) is greater than the population size (N). I will need to drop these rows.
What is the most efficient way to do this in R? For example: where n > N,…

enat_b
- 28
- 4
-1
votes
2 answers
Unable to drop schema 'jobs_internal' because it is being referenced by object 'id_list' in Azure Managed SQL
I'm trying to export database from Azure and facing various issues.
One or more unsupported elements were found in the schema used as part of a data package. Error SQL71501: Error validating element [jobs_internal].[visible_targets_formatted]: View:…

Sergei Prokopov
- 39
- 3
-1
votes
1 answer
Pandas drop all cells with Values and leave only blank cells
I want to do the following:
index
A1
0
1
1
2
-8
3
Hello
4
to:
index
A1
1
4
Is there like a reverse .dropna function?

Petra Enis
- 17
- 4
-1
votes
1 answer
How do I select certain columns from Python?
I must be doing a very basic mistake. I am trying to select only certain columns from a dataframe, dropping the na rows. I also am supposed to reset the row index after removing the rows.
This is what my dataset looks like
CRIM ZN INDUS…

Giulia Petrilli
- 47
- 4
-1
votes
1 answer
Why did the row count of my Dataframe increase after using the .drop method?
I was trying to drop play count that is greater than 5? I noticed when I use the line of code below, the shape of my data increase from 130398 rows × 7 columns to 400730 rows × 7 columns, does any one know why?
df_final=df.drop(df[df.play_count>…

Yara H
- 11
- 1
-1
votes
1 answer
Dropping specific cells (nulls/NaN) instead of rows or columns in a DataFrame
I am working with a dataframe with multiple columns and rows. I am trying to get rid of the cells within that frame that have null values.
I have read about dropna(), but dropna() will drop the entire row or column. What if I still want to keep the…

izzypt
- 170
- 2
- 16
-1
votes
1 answer
DROP VIEW without drop dependent views
I need to change a VIEW, so I have to DROP and CREATE it.
DB2 manual say "Any views that are dependent on the view being dropped are made inoperative."
I try but dependent view are dropped, not made inoperative.
Is there a way to bypass the…

Nifriz
- 1,033
- 1
- 10
- 21
-1
votes
1 answer
unable to drop rows which have NaN values in specific rows
I have to drop rows whose values is NaN in a specific Column ('Class') in my Dataframe.
I know it is a common question and there is a lot of answers for it but I tried all ways that I found but nothing works.
I tried it…

MCore
- 1
- 3
-1
votes
1 answer
Remove rows from PySpark dataframe where value only appears once
There is a very similar question to this one for pandas
my Dataframe is like the following:
ID Month Metric1 Metric2
1 01 4 3
3 01 4 2
3 01 3 1
1 02 3 …

Meike
- 171
- 13
-1
votes
2 answers
Drop records from dataframe based on the null present for any column
How to select only the rows with IDs for which there are no rows which contain nulls.
+---------+------+-----+
|AccountID| Name|Price|
+---------+------+-----+
| 11|miguel| null|
| 11|luisa | 21|
| 12| hary| 90|
…

Priyanka
- 51
- 7
-1
votes
1 answer
Pandas : drop duplicated row based on some conditions
I hope you're doing well.
I want to drop duplicates rows based on some conditions.
For example :
A B C D E
0 foo 2 3 4 100
1 foo 2 3 1 3
2 foo 2 3 5 nan
3 bar 1 2 8 nan
4 bar 1 2 1 nan
The result…

Abdelfattah Boutanes
- 71
- 1
- 7
-1
votes
3 answers
Removing values from a column in a dataframe
I am trying to remove these values from this column ProductType - type:int64 from a dataframe (df2):
df3 = df2.drop(df2.index[df2['ProductType'] == '100', '109', '110', '118', '123', '124', '143', '153', '163',
…

Catalina Tocasuchil
- 13
- 4
-1
votes
1 answer
Deleting nonmatching rows between two data sets pandas
I have 2 very large data sets each of 5 columns( h, k, l, intensity, sigma). I would like to compare them row by row with respect to h,k,l values only. I need then to remove the nonmatching rows from each data set and rewrite each data set with only…

Sara
- 13
- 4
-1
votes
1 answer
How to drop a column with foreign key in MySQL?
Let's say I used the following structure to create a table:
CREATE TABLE staff (
sid INT AUTO_INCREMENT,
sfname VARCHAR(30) NOT NULL,
slname VARCHAR(30) NOT NULL,
uid int UNIQUE,
bid int NOT NULL,
PRIMARY KEY (sid),
…

AcKuber
- 41
- 1
- 5