home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 426398031

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions performed_via_github_app issue
https://github.com/pydata/xarray/issues/2459#issuecomment-426398031 https://api.github.com/repos/pydata/xarray/issues/2459 426398031 MDEyOklzc3VlQ29tbWVudDQyNjM5ODAzMQ== 1217238 2018-10-02T19:20:04Z 2018-10-02T19:20:04Z MEMBER

Here are the top entries I see with %prun cropped.to_xarray(): ``` 308597 function calls (308454 primitive calls) in 0.651 seconds

Ordered by: internal time

ncalls tottime percall cumtime percall filename:lineno(function) 100000 0.255 0.000 0.275 0.000 datetimes.py:606(<lambda>) 1 0.165 0.165 0.165 0.165 {built-in method pandas._libs.lib.is_datetime_with_singletz_array} 1 0.071 0.071 0.634 0.634 {method 'get_indexer' of 'pandas._libs.index.BaseMultiIndexCodesEngine' objects} 1 0.054 0.054 0.054 0.054 {pandas._libs.lib.fast_zip} 1 0.029 0.029 0.304 0.304 {pandas._libs.lib.map_infer} 100009 0.011 0.000 0.011 0.000 datetimelike.py:232(freq) 9 0.010 0.001 0.010 0.001 {pandas._libs.lib.infer_dtype} 100021 0.010 0.000 0.010 0.000 datetimes.py:684(tz) 1 0.009 0.009 0.009 0.009 {built-in method pandas._libs.tslib.array_to_datetime} 2 0.008 0.004 0.008 0.004 {method 'get_indexer' of 'pandas._libs.index.IndexEngine' objects} 1 0.008 0.008 0.651 0.651 dataarray.py:1827(from_series) 66/65 0.005 0.000 0.005 0.000 {built-in method numpy.core.multiarray.array} 24/22 0.001 0.000 0.362 0.016 base.py:677(_values) 17 0.001 0.000 0.001 0.000 {built-in method numpy.core.multiarray.empty} 19/18 0.001 0.000 0.189 0.010 base.py:4914(_ensure_index) 5 0.001 0.000 0.001 0.000 {method 'repeat' of 'numpy.ndarray' objects} 2 0.001 0.000 0.001 0.000 {method 'tolist' of 'numpy.ndarray' objects} 2 0.001 0.000 0.001 0.000 {pandas._libs.algos.take_1d_object_object} 4 0.001 0.000 0.001 0.000 {pandas._libs.algos.take_1d_int64_int64} 1846 0.001 0.000 0.001 0.000 {built-in method builtins.isinstance} 16 0.001 0.000 0.001 0.000 {method 'reduce' of 'numpy.ufunc' objects} 1 0.001 0.001 0.001 0.001 {method 'get_indexer' of 'pandas._libs.index.DatetimeEngine' objects} ```

There seems to be a suspiciously large amount of effort applying a function to individual datetime objects.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  365973662
Powered by Datasette · Queries took 0.8ms · About: xarray-datasette