Questions tagged [drop]

468 questions
0
votes
1 answer

Drop rows where all Boolean columns are False - Python

How do I drop a row if all rows have the value False? (here it would mean dropping 'kiwi'.) print(df.head()) > concatenated category apple banana orange > 0 apple_banana two True True False > 1 apple one …
arv
  • 398
  • 1
  • 9
0
votes
0 answers

Begin importing data

I have this query that was originally for Oracle now I'm converting it to SQL and I got this error message: Msg 102, Level 15, State 1, Line 1 Incorrect syntax near 'importing'. I'm also connecting to another SQL server. Begin importing data --…
Chris
  • 11
  • 1
0
votes
0 answers

On SwiftUI AppKit project, dropEntered of DropDelegate not trigged

The code from https://github.com/onmyway133/blog/issues/594, and make some changes. It's very simple, create a SwiftUI + Appkit project, copy and paste the code below to the project. import SwiftUI struct SelectFileView: View { let buttonTitle:…
Donly
  • 55
  • 8
0
votes
1 answer

How to drop incoming packets using TC

I'm using tc to drop outgoing packets on a specified ethernet port. Is there a way to apply a similar loss of packets but not on the transmitting direction? I'd want to drop n% of packets that come into my system from a selected ethernet port.
0
votes
2 answers

in r drop columns in dataframe defined in a list using a for loop

I have a dataframe and I want to drop columns which are defined in a list. First I have made a list of samples (which I want to keep) out of a excisting dataframe: df_1 <- data.frame(sample = c("col1","col3"), gender = c("m","v")) samplename <-…
0
votes
3 answers

I used dropna() on Python but it didn't deleted any rows

My DataFrame has two columns, both of which have NaN values. I need to delete the rows with NaN just on the column user_email. However, I used df['user_email'] = df['user_email'].dropna() but it returned the exact same DataFrame, with all the NaN…
Adamastor
  • 11
  • 3
0
votes
1 answer

Drop duplicated values with specific condition on another colunm pandas

I want to drop duplicate values on "Nit", but keeping when date "Date" is 31-12-2018 Nit sales date 12345 56 31-12-2018 12345 45 31-06-2018 23346 87 31-12-2018 76553 93 31-12-2018 44556 34 …
jimmy
  • 340
  • 2
  • 13
0
votes
1 answer

How to drop specific packet captured in NS-3 mesh node?

I'm using NS-3 v3.28.1 to simulation a WiFi Mesh network. The grid topology (actually only one line, with IEEE 802.11s stack installed at each node, HWMP protocol) contains 3 WiFi Mesh nodes, Node0, Node1 and Node2. Then I bind a UDP socket (acting…
0
votes
2 answers

Return rows with some text in them and delete the rest

I have a dataframe df with values as below: Common_words count 0 realdonaldtrump 2932 2 new 2347 3 2030 4 trump 2013 5 good 1553 6 1440 7 great …
noob
  • 3,601
  • 6
  • 27
  • 73
0
votes
0 answers

Delete and filter rows in dataframe in scala which has invalid datatype content other than expected data type

I'm new to spark and have a question regarding filtering dataframe based on dataype validation. I want to filter and delete rows which does not have expected dataype content. I have tried filtering like df.filter(row => row.schema("id").dataType ==…
0
votes
0 answers

AttributeError: 'NoneType' object has no attribute 'drop' in pandas when used drop() function

prerequisites: these are all the columns in my "movies" dataframe: Index(['color', 'director_name', 'num_critic_for_reviews', 'duration', 'director_facebook_likes', 'actor_3_facebook_likes', 'actor_2_name', 'actor_1_facebook_likes',…
0
votes
0 answers

Drag and drop image from wpf application to uwp application

I am trying to drag an image from WPF application to UWP application but getting this error "invalid formatetc structure (exception from hresult: 0x80040064 (dv_e_formatetc)) in GetStorageItemsAsync method" public async void OnFileDrop(object…
Laxmi
  • 83
  • 8
0
votes
1 answer

Creating a simple dropdown with 'onmouseover'

Hi I just want a small box to drop down when I mouse over an element, and I want it go away when I mouse out. Where am I going wrong? My HTML:
New …
Jamesyt60
  • 57
  • 6
0
votes
1 answer

Drop columns in with only NaN values, pandas dataframe

I have a dataframe where i want to drop every row where df['Rank'] < 16, and when i do df = df['Rank'].where(df['Rank'] < 16) it gives alot of NaN values (as it should), and then to remove these values i could do df = df.dropna ,but the problem is…
Eric costa
  • 35
  • 5
0
votes
1 answer

Erorr with drop specific rows with Pandas

I'm trying to drop specific rows of my dataset, and I always have the same error. I have several candidates and I just want to work with two. I tried with "not in"condition, but when I need to visualize it used all the candidates. I used the same…