You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The deprecation warning for the delim_whitespace option suggests using sep="\s+" instead. Since \s is not a valid escape sequence, in Python 3.11 and earlier this is equivalent to sep=r"\s+".
However, in Python 3.12, invalid escape sequences now generate SyntaxWarnings. I would suggest that Pandas should avoid advising users to add code that will generate warnings (in particular when doing so via a warning—if the suggestion is implemented, then the number of warnings would remain constant rather than decreasing)
Suggested fix for documentation
Replace all instances of sep="\s+" with either sep=r"\s+" or sep="\\s+".