Python Forum
FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries
#3
(Apr-22-2024, 03:18 AM)deanhystad Wrote: If speed is important, don’t loop and really don’t build data frames a row at a time. This code is what I expect to see when someone has a speed complaint

Yes I completely agree with you - actually the first pass at my dataframe I do with boolean indexing to get rid of erroneous values, but then it gets complicated when I need to get rid of edge cases. Unfortunately this is to deal with an edge case that is simply impossible to get rid of with boolean indexing. Fortunately this loop maybe only has to iterate 50-100 times in a dataset of about 1 million rows, because that's how much the edge case occurs so it's not too bad of a performance hit.

https://www.elitetrader.com/et/threads/p...ket.52398/

What I'm doing is identifying "late prints" in stock market tape and removing these as they completely mess with stop losses in backtesting. Late prints in themselves are an edge case - but single late prints are easy enough to ID with a boolean expression. But then the first edge case to the edge case are where you have multiple in a row where the price is the same - and you don't know how many rows of these multiples are coming. Then the edge case to the edge case to the edge case is where you have multiple in a row, for an unknown number of rows and the price is not the same (but could be the same for some, but more accurately not the same for all).
Reply


Messages In This Thread
RE: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries - by sawtooth500 - Apr-22-2024, 01:14 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries i sawtooth500 3 17,421 Mar-22-2024, 03:08 AM
Last Post: deanhystad
  String concatenation in SQL update statement hammer 3 2,562 Feb-24-2022, 08:00 PM
Last Post: hammer
  f string concatenation problem growSeb 3 3,062 Jun-28-2021, 05:00 AM
Last Post: buran
  Concatenation ?? ridgerunnersjw 1 2,265 Sep-26-2020, 07:29 PM
Last Post: deanhystad
  FutureWarning: pandas.util.testing is deprecated buunaanaa 3 6,262 May-17-2020, 07:43 AM
Last Post: snippsat
  Combining two strings together (not concatenation) DreamingInsanity 6 4,318 Mar-29-2019, 04:32 PM
Last Post: DreamingInsanity
  Handling null or empty entries from Entry Widget KevinBrown 1 2,893 Mar-17-2019, 04:22 PM
Last Post: perfringo
  append elements into the empty dataframe jazzy 0 2,579 Sep-26-2018, 07:26 AM
Last Post: jazzy
  Regarding concatenation of a list to a string Kedar 2 23,718 Aug-19-2018, 12:57 PM
Last Post: ichabod801

Forum Jump:

User Panel Messages

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