original_docstring: 
      Modify dataframe by adding a column 'moving' to identify when robot was moving.
      (Best to first smoothen velocity data.)
      
docstring: Modify dataframe by adding a column 'moving' to identify when robot was moving.
  (Best to first smoothen velocity data.)
docstring_tokens: Modify dataframe by adding a column ' moving ' to identify when robot was moving . ( Best to first smoothen velocity data . )
code: def calc_moving(df, thresholdXY=0.01, thresholdRz=0.01):
      """
      Modify dataframe by adding a column 'moving' to identify when robot was moving.
      (Best to first smoothen velocity data.)
      """
      def f(row):
          return (abs(row['vel_x']) > thresholdXY) or (abs(row['vel_y']) > thresholdXY) or (abs(row['vel_Rz']) > thresholdRz)
      df['moving'] = df.apply(f, axis=1)
code_tokens: def calc_moving ( df , thresholdXY = 0.01 , thresholdRz = 0.01 ) : def f ( row ) : return ( abs ( row [ 'vel_x' ] ) > thresholdXY ) or ( abs ( row [ 'vel_y' ] ) > thresholdXY ) or ( abs ( row [ 'vel_Rz' ] ) > thresholdRz ) df [ 'moving' ] = df . apply ( f , axis = 1 )
short_docstring: Modify dataframe by adding a column 'moving' to identify when robot was moving.
short_docstring_tokens: Modify dataframe by adding a column ' moving ' to identify when robot was moving .
comment: """
      Modify dataframe by adding a column 'moving' to identify when robot was moving.
      (Best to first smoothen velocity data.)
      """