Jump to content

Siqi Hu

Members
  • Posts

    1
  • Joined

  • Last visited

Siqi Hu's Achievements

Rookie

Rookie (2/14)

  • Week One Done
  • Conversation Starter

Recent Badges

0

Reputation

  1. Hello, Does there exist a method to pull the data with some of them need to be applied with a formula? For example, I want to pull several signals all at once, including "SP", "MODE", "OUT", "PV". For SP and MODE, these attributes are categorical, so there are only four possibilities, for instance, for their values, which are 0, 1, 8, 9. However, with spy.pull() function, these attributes will be interpolated. So I have to pull first the data for "OUT", "PV", and again pull the data for "SP" and "MODE" with a parameter "calculation", as follows: # My current method is with 2 pull functions, but they took too much time for many signals my_pull_1 = spy.pull( my_search.query("Name not in ('MODE', 'SP')"), start=start, end=end, grid=grid, ) my_pull_2 = spy.pull( my_search.query("Name in ('MODE', 'SP')"), start=start, end=end, grid=grid, calculation="$signal.toStep()" ) Since in my_search dataframe, there could be thousands of different "MODE" and "SP" signals, pulling the data twice will be very slow. Is there a way that I can pull only once the data, and apply the function to only part of the signals, like defining the formula parameter for the function? # what I would like to realize is something like this my_pull = spy.pull( my_search, start=start, end=end, grid=grid, formula="$Mode.toStep()", formula_parameters={ "$Mode": my_search[my_search['Name'] == 'MODE'] } ) Thanks in advance, Siqi
×
×
  • Create New...