code: def _format_axes(self):
          
          if not self.obj.index.is_unique and self.orient in (
                  'index', 'columns'):
              raise ValueError("DataFrame index must be unique for orient="
                               "'{orient}'.".format(orient=self.orient))
          if not self.obj.columns.is_unique and self.orient in (
                  'index', 'columns', 'records'):
              raise ValueError("DataFrame columns must be unique for orient="
                               "'{orient}'.".format(orient=self.orient))
docs: Try to format axes if they are datelike.