Questions tagged [drop]
468 questions
164
votes
8 answers
Drop rows containing empty cells from a pandas DataFrame
I have a pd.DataFrame that was created by parsing some excel spreadsheets. A column of which has empty cells. For example, below is the output for the frequency of that column, 32320 records have missing values for Tenant.
>>> value_counts(Tenant,…

Amrita Sawant
- 10,403
- 4
- 22
- 26
63
votes
4 answers
How to drop a template database from PostgreSQL?
postgres=# DROP DATABASE template_postgis;
ERROR: cannot drop a template database
http://www.postgresql.org/docs/9.1/static/manage-ag-templatedbs.html makes it seem like if I set template_postgis.datistemplate = false, I'll be able to drop it, but…

dbkaplun
- 3,407
- 2
- 26
- 33
35
votes
4 answers
Is there a postgres command to list/drop all materialized views?
I am creating multiple views in my code and each time the code is run, I would like to drop all the materialized views generated thus far. Is there any command that will list all the materialized views for Postgres or drop all of them?

user1150989
- 493
- 1
- 4
- 9
25
votes
1 answer
Why doesn't the '@drop' event work for me in vue?
The @drop listener doesn't work for me. It doesn't call the method I'm telling it to call.
I want to drag the chip and be able to drop it on another component, and perform a function, but at the time of dropping the chip, the dropLink method is not…

mk_xt
- 491
- 1
- 4
- 6
12
votes
5 answers
Remove top row from a dataframe
I have a dataframe that looks like this:
level_0 level_1 Repo Averages for 27 Jul 2018
0 Business Date Instrument Ccy
1 27/07/2018 GC_AUSTRIA_SUB_10YR EUR
2 …

SBad
- 1,245
- 5
- 23
- 36
11
votes
1 answer
Pandas: garbage-collect drop'ped columns to release memory
I'm handling a large dataset with about 20,000,000 rows and 4 columns.
Unfortunately, the available memory on my machine (~16GB) is not sufficient.
Example (Time is seconds since midnight):
Date Time Price Vol
0 20010102 …

BayerSe
- 1,101
- 2
- 12
- 23
7
votes
4 answers
How do I destructure an object without dropping it?
I have a struct that I want to take by value, mutate and then return. I want to also mutate its generic type as I use this state for statically ensuring correct order of function calls for making safe FFI (playground):
use…

alagris
- 1,838
- 16
- 31
6
votes
5 answers
Drop columns when there are many missingness in R
I am trying to drop some columns that have less than 5 valid values. Here is an example dataset.
df <- data.frame(id = c(1,2,3,4,5,6,7,8,9,10),
i1 = c(0,1,1,1,1,0,0,1,NA,1),
i2 = c(1,0,0,1,0,1,1,0,0,NA),
…

amisos55
- 1,913
- 1
- 10
- 21
6
votes
0 answers
Is it possible to find out which user dropped a table in Postgres?
Is there a transaction log or any other way to find out which user (and when) dropped some table from the database? I am working with Postgres DB.
Thanks.

Mika
- 61
- 3
5
votes
1 answer
Xdnd drop support faulty implementation
I have implemented a Xdnd drop support implementation in VTK some time ago. It was working great except with Thunar file manager. All other file managers were working fine at the time. We dismissed this limitation a Thunar bug at the time.
The…

Mathieu Westphal
- 2,544
- 1
- 19
- 33
4
votes
4 answers
Drop numbers in list with condition in python
I am trying to drop numbers located between consecutive numbers in list. Example:
Form
[1, 3, 5, 6, 7, 8, 9, 11, 12, 13, 18]
To
[1, 3, 5, 9, 11, 13, 18]
You'll see that [6, 7, 8] and [12] are dropped

pyaj
- 545
- 5
- 15
4
votes
2 answers
python pandas drop duplicate columns by condition
i want to drop duplicate columns by condition
so what i want to do is where "type" is the same(duplicate) drop the "number" one
i got…

matan
- 451
- 4
- 12
3
votes
0 answers
Oracle - Inconsistent drop column behavior on a table with COMPRESS BASIC
How can I determine in advance if a table with COMPRESS BASIC will or will not generate the ORA-39726 error?
SQL*Plus: Release 19.0.0.0.0 - Production on Wed May 31 08:37:58 2023
Version 19.14.0.0.0
Copyright (c) 1982, 2021, Oracle. All rights…

Alex Bartsmon
- 471
- 4
- 9
3
votes
1 answer
Remove duplicated values appear in two columns in dataframe
I have table similar to this one:
index name_1 path1 name_2 path2
0 Roy path/to/Roy Anne path/to/Anne
1 Anne path/to/Anne Roy path/to/Roy
2 Hari path/to/Hari Wili …

Reut
- 1,555
- 4
- 23
- 55
3
votes
0 answers
SwiftUI Drag and Drop preview shrinks too much on drag
I have implemented Drag and Drop on SwiftUI using onDrag and onDrop APIs. I have a question regarding the preview image for the drag. The item seems to shrink too much when we start dragging. As you can see in the gif below, the width of the item is…

Osama Naeem
- 1,830
- 5
- 16
- 34