pandas.io.stata.StataReader.data_label#

property StataReader.data_label[source]#

Return data label of Stata file.

Examples

>>> df = pd.DataFrame([(1,)], columns=["variable"])
>>> time_stamp = pd.Timestamp(2000, 2, 29, 14, 21)
>>> data_label = "This is a data file."
>>> path = "/My_path/filename.dta"
>>> df.to_stata(
...     path,
...     time_stamp=time_stamp,  
...     data_label=data_label,  
...     version=None,
... )  
>>> with pd.io.stata.StataReader(path) as reader:  
...     print(reader.data_label)  
This is a data file.