Skip to content

Commit cbe65ce

Browse files
committed
Fix syntax for dictionary literals in StataWriter docstring examples by replacing double brackets '{{' and replacing with single brackets '{'
1 parent 0e48820 commit cbe65ce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/io/stata.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2469,14 +2469,14 @@ class StataWriter(StataParser):
24692469
>>> writer.write_file()
24702470
24712471
Directly write a zip file
2472-
>>> compression = {{"method": "zip", "archive_name": "data_file.dta"}}
2472+
>>> compression = {"method": "zip", "archive_name": "data_file.dta"}
24732473
>>> writer = StataWriter("./data_file.zip", data, compression=compression)
24742474
>>> writer.write_file()
24752475
24762476
Save a DataFrame with dates
24772477
>>> from datetime import datetime
24782478
>>> data = pd.DataFrame([[datetime(2000, 1, 1)]], columns=["date"])
2479-
>>> writer = StataWriter("./date_data_file.dta", data, {{"date": "tw"}})
2479+
>>> writer = StataWriter("./date_data_file.dta", data, {"date": "tw"})
24802480
>>> writer.write_file()
24812481
"""
24822482

0 commit comments

Comments
 (0)