code: def df_year_to_date(df: DataFrame) -> DataFrame:
      """Yields the Year-to-Date (YTD) DataFrame"""
      in_ytd = df.index >= Timestamp.now().strftime("%Y-01-01")
      if any(in_ytd):
          return df[in_ytd]
      return df
  
file_path: pandas-ta/pandas_ta/utils/_time.py
imports: from datetime import datetime
  from time import localtime, perf_counter
  from typing import Tuple
  from pandas import DataFrame, Timestamp
  from pandas_ta import EXCHANGE_TZ, RATE
label_desc: Use image node_id 4 for calling a global function with example usage: df_year_to_date(df) and returns: df, df