From e4cc178b5b2f06d0506f3dc5028ad19ff37e2050 Mon Sep 17 00:00:00 2001 From: Lu Yibo <1478354316@qq.com> Date: Fri, 7 Nov 2025 20:14:27 +0800 Subject: [PATCH] remove @Appender in sas_xport.py Updated the read method documentation to include parameters and return type. --- pandas/io/sas/sas_xport.py | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/pandas/io/sas/sas_xport.py b/pandas/io/sas/sas_xport.py index fd967503305c3..88737c9be9f77 100644 --- a/pandas/io/sas/sas_xport.py +++ b/pandas/io/sas/sas_xport.py @@ -17,7 +17,6 @@ import numpy as np -from pandas.util._decorators import Appender from pandas.util._exceptions import find_stack_level import pandas as pd @@ -126,20 +125,6 @@ Contains information about the variables in the file """ -_read_method_doc = """\ -Read observations from SAS Xport file, returning as data frame. - -Parameters ----------- -nrows : int - Number of rows to read from data file; if None, read whole - file. - -Returns -------- -A DataFrame. -""" - def _parse_date(datestr: str) -> DatetimeNaTType: """Given a date in xport format, return Python date.""" @@ -464,8 +449,19 @@ def _missing_double(self, vec): miss &= miss1 return miss - @Appender(_read_method_doc) def read(self, nrows: int | None = None) -> pd.DataFrame: + """Read observations from SAS Xport file, returning as data frame. + + Parameters + ---------- + nrows : int + Number of rows to read from data file; if None, read whole + file. + + Returns + ------- + A DataFrame. + """ if nrows is None: nrows = self.nobs