original_docstring: If there is a 'duration' column, it changes to timedelta format.
             If there is not a 'duration' column, create it in timedelta format.
  
          Args:
              df dataframe: video_details dataframe with column 'file_path'
  
          Returns:
              dataframe: Update dataframe with column 'duration'
                          in timedelta format
          
docstring: If there is a 'duration' column, it changes to timedelta format.
  If there is not a 'duration' column, create it in timedelta format.
docstring_tokens: If there is a ' duration ' column it changes to timedelta format . If there is not a ' duration ' column create it in timedelta format .
code: def process_column_duration(df):
          """If there is a 'duration' column, it changes to timedelta format.
             If there is not a 'duration' column, create it in timedelta format.
  
          Args:
              df dataframe: video_details dataframe with column 'file_path'
  
          Returns:
              dataframe: Update dataframe with column 'duration'
                          in timedelta format
          """
  
          if 'duration' in df.columns:
              df['duration'] = pd.to_timedelta(df['duration'])
          else:
              df['duration'] = df['file_path'].apply(get_duration_video)
  
          return df
code_tokens: def process_column_duration ( df ) : if 'duration' in df . columns : df [ 'duration' ] = pd . to_timedelta ( df [ 'duration' ] ) else : df [ 'duration' ] = df [ 'file_path' ] . apply ( get_duration_video ) return df
short_docstring: If there is a 'duration' column, it changes to timedelta format.
short_docstring_tokens: If there is a ' duration ' column it changes to timedelta format .
comment: """If there is a 'duration' column, it changes to timedelta format.
             If there is not a 'duration' column, create it in timedelta format.
  
          Args:
              df dataframe: video_details dataframe with column 'file_path'
  
          Returns:
              dataframe: Update dataframe with column 'duration'
                          in timedelta format
          """