From ed31a35b17d676ae62a962c67d1b1fab692894ab Mon Sep 17 00:00:00 2001 From: Jason Kiley Date: Sun, 11 Nov 2018 15:41:49 -0600 Subject: [PATCH] More helpful Stata string length error. The current error string when trying to write a string longer than 244 characters does not point users toward a solution that already exists: using the `version=117` parameter. --- pandas/io/stata.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandas/io/stata.py b/pandas/io/stata.py index df0d47b063411..66e996075f1ed 100644 --- a/pandas/io/stata.py +++ b/pandas/io/stata.py @@ -461,7 +461,8 @@ def parse_dates_safe(dates, delta=False, year=False, days=False): excessive_string_length_error = """ Fixed width strings in Stata .dta files are limited to 244 (or fewer) -characters. Column '%s' does not satisfy this restriction. +characters. Column '%s' does not satisfy this restriction. Use the +'version=117' parameter to write the newer (Stata 13 and later) format. """