Weird results when I run a scenario ascending or descending , when looking back

Noah
Noah Registered Posts: 43 ✭✭✭✭

I have data for Oct, Nov and Dec. I have to look back at the prior month to get the beginning of period values. I have the scenario set up so that it builds the inputs for the current and prior months. (If I run December it builds December and November). I have python code that looks back and gets the BOP and EOP values based on the partition I am running. It looks like so.

# -*- coding: utf-8 -*-
import dataiku
import pandas as pd, numpy as np
from dataiku import pandasutils as pdu

# Read recipe inputs
ds = dataiku.Dataset("IT_Extracts_VUL_DAC")
valcurr = dataiku.dku_flow_variables["DKU_SRC_LAST_DATE"]
valprior = dataiku.dku_flow_variables["DKU_SRC_FIRST_DATE"]


ds.read_partitions = [valcurr]
df_EOP = ds.get_dataframe()

ds.read_partitions = [valprior]
df_BOP = ds.get_dataframe()



cols = ["POLNO","FV0_Floored","ISSUE_DATE","FVSA0","sum_IndexFV","VALUEDATE_Check"]
avcols= ["FV0_Floored","FVSA0","sum_IndexFV"]

df_EOP = df_EOP[cols]
df_EOP.columns=df_EOP.columns.map(lambda x : x+'_EOP' if x in avcols else x)
df_BOP = df_BOP[cols]
df_BOP.columns=df_BOP.columns.map(lambda x : x+'_BOP' if x in avcols else x)

df_joined = df_EOP.merge(df_BOP,on="POLNO",how = "left")

# Write recipe outputs
VUL_Partition = dataiku.Dataset("VUL_Partition")
VUL_Partition.write_with_schema(df_joined)

Things get weird when I run the scenario in Ascending (Oct, Nov and Dec) versus descending (Dec, Nov and Oct) order.

It seems like the DSS is rounding the account values when I run ascending, but it does not do this for descending. Does anyone know what is going on here?

Thank you!

Setup Info
    Tags
      Help me…