Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Converting Filter to If Else Statement and Count
Post: Converting Filter to If Else Statement and Count

I have a dataset with over 9000 rows and multiple columns. I would like to filter a couple columns, one by type from dropdown selection, the other to include keywords in a different column. Once filte...
RookToday Data Science 1 1,682 Jul-19-2020, 06:08 PM
    Thread: Filtered Row Count
Post: RE: Filtered Row Count

I believe that I have been making progress: seriesObj = df.apply(lambda x: True if x['Type of breach'] != 'HACK' else False , axis=1) numOfRows = len(seriesObj[seriesObj == True].index) print('Nu...
RookToday General Coding Help 1 8,938 Jul-18-2020, 09:13 PM
    Thread: Filtered Row Count
Post: Filtered Row Count

I am trying to get a row count for a filtered data frame. filt = (df['Type of breach']!='HACK') & (df['Description of incident'].str.contains('bank account', na=False) | df['Description of incid...
RookToday General Coding Help 1 8,938 Jul-18-2020, 05:23 PM
    Thread: And and Or Filters on Same Line
Post: RE: And and Or Filters on Same Line

Thank you very much. That seemed to work.
RookToday Data Science 2 1,587 Jul-18-2020, 03:33 PM
    Thread: And and Or Filters on Same Line
Post: And and Or Filters on Same Line

Hello, I am trying to filter two columns in a dataset. One filter is a selection type, the other filter will be to include key words in a description. I do not understand the error codes that I am get...
RookToday Data Science 2 1,587 Jul-18-2020, 06:13 AM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020