Flexible and powerful data analysis / manipulation library for Python, providing labeled data structures similar to R data.frame objects, statistical functions, and much more
simonjayhawkins on master
BUG: Placeholders not being fil… (compare)
jreback on master
ENH: Styler tooltips feature (#… (compare)
pandas
Dockerfile. I'll have a look at that.
pd.Timedelta.isoformat
has wrong output for an example in the documentation. pd.Timedelta(hours=1, seconds=10).isoformat()
-> 'P0DT0H0M10S'
, while it should be 'P0DT1H0M10S'
In [6]: pd.Timedelta(hours=1, seconds=10).isoformat()
Out[6]: 'P0DT1H0M10S'
build_ext
as follows but I don't think it worked. cygdb
was still unable to find symbols: $ python setup.py build_ext --inplace -j 4 --with-debugging-symbols --pyrex-gdb --with-cython-coverage
Was looking at pandas-dev/pandas#32259 again
In summary: the issue is to deprecate MultiIndex.is_lexsorted
as a public method and replace it with MultiIndex._is_lexsorted
- users should use MultiIndex.is_monotonic_increasing
.
Question is - how do we do that? I presume we need to warn about the deprecation, but how do we raise a FutureWarning (as is normally done for deprecations) without it always being triggered when the function is used internally?
>>> pd.date_range(start='1/1/2018 00:00:00', end='2/1/2018 00:01:00', freq="MS")
DatetimeIndex(['2018-01-01', '2018-02-01'], dtype='datetime64[ns]', freq='MS')
>>> pd.date_range(start='1/1/2018 00:00:00', end='2/1/2018 00:01:00', freq="MS").to_period().to_timestamp()
DatetimeIndex(['2018-01-01', '2018-02-01'], dtype='datetime64[ns]', freq=None)
loc
or Series.where
, but the latter does not suffice in all situations. Furthermore if you search for "pandas conditional column" you will probably end up here (https://stackoverflow.com/questions/19913659/pandas-conditional-creation-of-a-series-dataframe-column), where we can see the result of not being explicit, since there are least 10 methods mentioned. The top answer is the way to go, but still it uses two numpy methods. Also looking a bit more ahead, using np.where
or np.select
is not very optimal when eventually working with pandas arrays, since both methods will return a numpy array.
df.loc[:, "a":"f"]
. Thanks
mypy pandas
works fine for me, but dmypy run -- pandas
throws a few errors$ dmypy run -- pandas
pandas/_config/display.py:12: error: Need type annotation for '_initial_defencoding' [var-annotated]
pandas/_version.py:54: error: Need type annotation for 'HANDLERS' (hint: "HANDLERS: Dict[<type>, <type>] = ...") [var-annotated]
pandas/core/arrays/masked.py:43: error: Need type annotation for 'base' [var-annotated]
pandas/core/computation/expressions.py:24: error: Need type annotation for '_TEST_MODE' [var-annotated]
pandas/core/computation/expressions.py:27: error: Need type annotation for '_evaluate' [var-annotated]
pandas/core/computation/expressions.py:28: error: Need type annotation for '_where' [var-annotated]
pandas/core/dtypes/common.py:66: error: Need type annotation for '_is_scipy_sparse' [var-annotated]
pandas/core/dtypes/dtypes.py:54: error: Need type annotation for 'subdtype' [var-annotated]
pandas/core/dtypes/dtypes.py:59: error: Need type annotation for 'base' [var-annotated]
pandas/core/generic.py:183: error: Need type annotation for '_is_copy' [var-annotated]
pandas/core/generic.py:408: error: Need type annotation for '_ix' [var-annotated]
pandas/core/series.py:415: error: Need type annotation for '_index' [var-annotated]
pandas/io/excel/_base.py:748: error: Need type annotation for 'curr_sheet' [var-annotated]
pandas/io/excel/_base.py:749: error: Need type annotation for 'path' [var-annotated]
pandas/io/excel/_util.py:7: error: Need type annotation for '_writers' (hint: "_writers: Dict[<type>, <type>] = ...") [var-annotated]
pandas/io/pytables.py:211: error: Need type annotation for '_table_mod' [var-annotated]
pandas/io/sql.py:38: error: Need type annotation for '_SQLALCHEMY_INSTALLED' [var-annotated]
pandas/plotting/_core.py:1715: error: Need type annotation for '_backends' (hint: "_backends: Dict[<type>, <type>] = ...") [var-annotated]
pandas/plotting/_matplotlib/converter.py:43: error: Need type annotation for '_mpl_units' (hint: "_mpl_units: Dict[<type>, <type>] = ...") [var-annotated]
pandas/tests/io/test_gbq.py:21: error: Need type annotation for 'PROJECT_ID' [var-annotated]
pandas/tests/io/test_gbq.py:22: error: Need type annotation for 'PRIVATE_KEY_JSON_PATH' [var-annotated]
pandas/tests/io/test_gbq.py:23: error: Need type annotation for 'PRIVATE_KEY_JSON_CONTENTS' [var-annotated]
pandas/tseries/holiday.py:331: error: Need type annotation for 'holiday_calendars' (hint: "holiday_calendars: Dict[<type>, <type>] = ...") [var-annotated]
pandas/tseries/holiday.py:369: error: Need type annotation for '_cache' [var-annotated]
Found 24 errors in 16 files (checked 1179 source files)