Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
Add columns to IPython tab completions of DataFrame attributes #233
Closed
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
Jump to file or symbol
Failed to load files and symbols.
| @@ -1,3 +1,14 @@ | ||
| import sys | ||
| PY3 = (sys.version_info[0] >= 3) | ||
| + | ||
| +if PY3: | ||
| + def isidentifier(s): | ||
| + return s.isidentifier() | ||
| + | ||
| +else: | ||
| + # Python 2 | ||
| + import re | ||
| + _name_re = re.compile(r"[a-zA-Z_][a-zA-Z0-9_]*$") | ||
| + def isidentifier(s, dotted=False): | ||
| + return bool(_name_re.match(s)) |