Skip to content

Conversation

@jbrockmendel
Copy link
Member

Then remove unused imports in tslibs.

If/when this is merged, it'll be official: we've taken tslib from a 5500 line beast down to ~1k.

'_libs/tslibs/nattype'],
'depends': np_datetime_headers,
'sources': np_datetime_sources},
'_libs.tslibs.timestamps': {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tslib cimports timestamps

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixing now.

Convert TimeStamp to a Julian Date.
0 Julian date is noon January 1, 4713 BC.
"""
year = self.year
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can cdef these (TODO)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yah, in fact a bunch of stuff can be moved up to _Timestamp.

@jreback jreback added Clean Datetime Datetime data dtype labels Nov 19, 2017
@jreback
Copy link
Contributor

jreback commented Nov 19, 2017

If/when this is merged, it'll be official: we've taken tslib from a 5500 line beast down to ~1k.

sure but still some things things to move to the subs :> (I know already on your TODO).

in the end of the day tslibx.pyx could/should just be imports :>

maybe even not that!

@jreback
Copy link
Contributor

jreback commented Nov 19, 2017

lgtm. ping on green.

@codecov
Copy link

codecov bot commented Nov 20, 2017

Codecov Report

Merging #18369 into master will decrease coverage by 0.04%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #18369      +/-   ##
==========================================
- Coverage   91.38%   91.34%   -0.05%     
==========================================
  Files         164      164              
  Lines       49797    49799       +2     
==========================================
- Hits        45508    45487      -21     
- Misses       4289     4312      +23
Flag Coverage Δ
#multiple 89.14% <ø> (-0.03%) ⬇️
#single 39.55% <ø> (-0.07%) ⬇️
Impacted Files Coverage Δ
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/plotting/_converter.py 63.44% <0%> (-1.82%) ⬇️
pandas/core/indexes/interval.py 92.52% <0%> (-0.34%) ⬇️
pandas/core/frame.py 97.8% <0%> (-0.1%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a172ff9...414fa43. Read the comment docs.

@codecov
Copy link

codecov bot commented Nov 20, 2017

Codecov Report

Merging #18369 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #18369      +/-   ##
==========================================
- Coverage   91.36%   91.34%   -0.02%     
==========================================
  Files         164      164              
  Lines       49718    49718              
==========================================
- Hits        45426    45417       -9     
- Misses       4292     4301       +9
Flag Coverage Δ
#multiple 89.14% <ø> (ø) ⬆️
#single 39.61% <ø> (-0.07%) ⬇️
Impacted Files Coverage Δ
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/core/frame.py 97.8% <0%> (-0.1%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1647a72...c00d36b. Read the comment docs.

@jbrockmendel
Copy link
Member Author

Ping

@jreback
Copy link
Contributor

jreback commented Nov 20, 2017

rebase

@jbrockmendel
Copy link
Member Author

ping

return round(self.value / 1e9, 6)


cdef PyTypeObject* ts_type = <PyTypeObject*> Timestamp
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this needed? remove later?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still used in a couple places, we might be able to remove it later. Let’s get this and libmissing done and then take a look.

@jreback jreback added this to the 0.22.0 milestone Nov 22, 2017
@jreback jreback merged commit 8321421 into pandas-dev:master Nov 22, 2017
@jreback
Copy link
Contributor

jreback commented Nov 22, 2017

thanks!

@jbrockmendel jbrockmendel deleted the tslibs-timestamps3 branch December 8, 2017 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Clean Datetime Datetime data dtype

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants