Skip to content
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

please add quick documentation on pandas timestamp values of month, day of week #5813

Closed
jason-s opened this issue Dec 31, 2013 · 8 comments
Closed
Labels
Milestone

Comments

@jason-s
Copy link

jason-s commented Dec 31, 2013

Pandas appears to use values for timestamp fields where 1 = January, 2 = February, etc., (vs. 0 = January) and 0 = Monday, 1 = Tuesday, 2 = Wednesday, 3 = Thursday, 4 = Friday, 5 = Saturday, 6 = Sunday. (vs. weekday numbering that starts with 1 instead of 0, or Sunday instead of Monday.)

dec31 = pd.Timestamp('2013-12-30 00:00:00')
dec31.weekday()

prints 0 in my system (Mac OSX + pandas 0.12.0)

This convention doesn't appear to be in the documentation + it would really help as it is one of several possibilities.

@jreback
Copy link
Contributor

jreback commented Dec 31, 2013

would surely take a PRto document

these are the python conventions in any event

http://docs.python.org/2/library/datetime.html

@jreback
Copy link
Contributor

jreback commented Dec 31, 2013

related is #5519

@rockg
Copy link
Contributor

rockg commented Jan 1, 2014

It was added by #4706 and then subsequently removed to use the doc strings directly. @jorisvandenbossche, how does one document these methods/properties? Does one just need to add a weekday.doc?

In tseries.index

    dayofweek = _field_accessor('dayofweek', 'dow')
    weekday = dayofweek

@jorisvandenbossche
Copy link
Member

@rockg Yes, I converted the manual list to a sphinx autosummary table, so it would also use the docstring. However, I did not get to the addition of the docstring. I will do now.

@jorisvandenbossche
Copy link
Member

As a summary regarding this issue:

@jreback
Copy link
Contributor

jreback commented Jan 1, 2014

I think is for sure worthwhile to explain Timestamp a bit for in timeseries.rst (and maybe a mention in basics/10min, but meat in Timeseries)

(doesn't preclude your other buckets though )

@ghost
Copy link

ghost commented Jan 24, 2014

related #3324

@jreback
Copy link
Contributor

jreback commented Feb 20, 2014

#6380 closed this

@jreback jreback closed this as completed Feb 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants