-
-
Notifications
You must be signed in to change notification settings - Fork 18k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Series.weekday is totally undocumented #5519
Comments
Okay, great that you are finding all of these undocumented areas. Feel free |
But maybe another question: why is there a |
I have no idea why Series.weekday is the only date-time component available on the Series object. I would be fine with removing it. |
Okay, might be nice to add deprecated method decorators so you could just slap one on with a version number for when they'll be removed. Seems like there have been a number. Doesn't need to be complicated or anything. |
Something along these lines, adding a parameter to the decorator with the version: https://wiki.python.org/moin/PythonDecoratorLibrary#Generating_Deprecation_Warnings ? |
Sure, again doesn't need to be anything complicated. I'd probably prefer to do something like the following (and you can play around with or discard this if you like, I don't have time to put anything together right now). First, you'll probably want the @optional_args
def deprecated(f, future_version='a future version', alternative='', name=None):
if not compat.callable(f): # pragma: no cover
raise TypeError('Can only deprecate functions. Got %r' % f)
name = name or f.__name__ or ''
msg = '%(name) is deprecated and will be removed in %(future_version).' % dict(future_version=future_version, name=name)
if alternative:
msg += ' Use %r instead' % alternative
@functools.wraps(f)
def wrapper(*args, **kwargs):
warnings.warn(msg) # might want to bump the stack level here
return f(*args, **kwargs)
wrapper.__doc__ = 'DEPRECATED: %s\n%s' % (msg, wrapper.__doc__)
return wrapper Otherwise I might have time to do this next week. |
There is no documentations for this method: http://pandas.pydata.org/pandas-docs/dev/generated/pandas.Series.weekday.html
The text was updated successfully, but these errors were encountered: