piper.custom.from_julian

piper.custom.from_julian(julian: Union[str, int], jde_format: bool = True)Any[source]

apply_date function: (JDE) Julian -> Gregorian

References

# https://docs.oracle.com/cd/E26228_01/doc.93/e21961/julian_date_conv.htm#WEAWX259 # http://nimishprabhu.com/the-mystery-of-jde-julian-date-format-solved.html

Parameters
  • date (julian) – julian date to be converted

  • jde_format – default True. If False, assume ‘standard’ julian format.

Returns

gregorian_date

Return type

Any Gregorian based format

Examples

%%piper
sample_sales()
>> select(['-target_profit', '-actual_profit'])
# >> assign(month = lambda x: x['month'].apply(to_julian))
>> across('month', to_julian)
>> head(5)

  location  product     month  target_sales  actual_sales
  London    Beachwear  121001         31749       29209.1
  London    Beachwear  121001         37833       34049.7
  London    Jeans      121001         29485       31549
  London    Jeans      121001         37524       40901.2
  London    Sportswear 121001         27216       29121.1