Python Forum
Filter data into new dataframe as main dataframe is being populated
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Filter data into new dataframe as main dataframe is being populated
#1
Is this possible, i am populating a dataframe with a few fields and thousands of rows that will be saved into a CSV. For a separate reason, i need certain records to be inserted into a different dataframe, this will also be saved in a CSV, but for different audience and different purpose, so id like to see if during the "addition" of records into the main df, i can filter and add certain records that meet a criteria into a different df.

Or would it be easier to create the master df, then apply a filter to that and build the new df based on the filter. This 2nd df will require some calculations and other things before saving to CSV, so thats the reason for asking if its best to do it while df#1 is being populated or wait until df#1 is built, then build df#2
Reply


Messages In This Thread
Filter data into new dataframe as main dataframe is being populated - by cubangt - Oct-21-2023, 11:31 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries sawtooth500 14 1,188 Apr-24-2024, 01:42 AM
Last Post: sawtooth500
  Elegant way to apply each element of an array to a dataframe? sawtooth500 7 580 Mar-29-2024, 05:51 PM
Last Post: deanhystad
  Dataframe copy warning sawtooth500 4 494 Mar-25-2024, 11:38 PM
Last Post: sawtooth500
  FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries i sawtooth500 3 2,240 Mar-22-2024, 03:08 AM
Last Post: deanhystad
  Adding PD DataFrame column bsben 2 398 Mar-08-2024, 10:46 PM
Last Post: deanhystad
  Python Alteryx QS-Passing pandas dataframe column inside SQL query where condition sanky1990 0 819 Dec-04-2023, 09:48 PM
Last Post: sanky1990
  Comparing Dataframe to String? RockBlok 2 490 Nov-24-2023, 04:55 PM
Last Post: RockBlok
  DataFRame.concat() nafshar 3 842 Jul-14-2023, 04:41 PM
Last Post: nafshar
  Convert dataframe from str back to datafarme Creepy 1 710 Jul-07-2023, 02:13 PM
Last Post: snippsat
  Question on pandas.dataframe merging two colums shomikc 4 912 Jun-29-2023, 11:30 AM
Last Post: snippsat

Forum Jump:

User Panel Messages

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