Pandas reindex() does not reindex a MultiIndex

Code Sample, a copy-pastable example if possibledf = pd.DataFrame.from_dict({'A': {(42, 'foo', 4): 0, (42, 'foo', 9): 0}...

Pandas compare a column of np.timedelta64 with a single np.timedelta64 throws ValueError

Code Sample, a copy-pastable example if possible# Your code hereimport pandas as pdimport numpy as np# create a datefram...

Pandas Inconsistent and Hard-to-reproduce Issues with Null Index Values

Code Sample, a copy-pastable example if possible# Note: This is not real Python code. I can't reproduce these problems...

Pandas Providing index to pd.Series destroys categories

Code Sample, a copy-pastable example if possibledtype = pd.api.types.CategoricalDtype(categories=["A","B&...

Pandas Default value for missing values on merge

This is a reopening of https://github.com/pandas-dev/pandas/issues/1836. The suggestion there was to add a parameter to ...

Pandas RangeIndex is converted to Int64Index on save to HDF5 (to_hdf)

Hello, I'm not sure if it is an intended behavior or not, and I did not find any mention about this in the documentation...

Pandas np.int64 in pandas dataframes is not instance of np.int64

Code Sample, a copy-pastable example if possibleimport pandas as pdx = np.int64(4)print("input isinstance np.int64 ...

Pandas rolling.apply deprecated in the future series rolling sugjested but doesn't work

Code Sample,#series example then old example that threw the future warning commented outhousing_data['ma_apply_example']...

Pandas DOC: Freeze old whatsnew notes?

Currently on master, we have a new failure from the 0.10.0.txt whatsnew due to the line_width option being removed.Rathe...

Pandas Accessor behavior variances with multiindex

Code Sample, a copy-pastable example if possibledef gen(): yield '1','2',1,2 yield '1','2',1,2 yield '1','3',3,...

Pandas serie.str.split() different from pd.Series.str.split(serie)

Hi,I am learning Python and pandas.Is this an expected behavior ?serie= pd.Series(['a b', 'a b', 'a b', 'a b', 'a b', 'a...

Pandas Multicolumn .expanding()

The .expanding() function is super cool. It's order of magnitude faster than the obvious numpy alternative:import numpyi...

Pandas parquet docs clarification

Would someone please clarify what is meant by the description for the engine arg to DataFrame.to_parquet?engine : {‘auto...

Pandas Pandas Series.ne operator returning unexpected result against two slices of same Series

So I have this series of integers shown below from pandas import Series s = Series([1, 2, 3, 1, 2, 3, 1, 2, 3, 1, ...

Pandas "ValueError: Can only compare identically-labeled Series objects" when order of indicies is different

I noticed that you cannot compare 2 pd.Series objects together when the orders aren't perfectly identical. Comment From:...

Pandas SettingWithCopyWaraning when modifying a column that is the aggregation of 2 others

Code Sample, a copy-pastable example if possibledf = pd.DataFrame({'c1': [1, 2, 3], 'c2': [3, 4, 5]})df['c3'] = df['c1']...

Pandas SettingWithCopyWarning when modifying a column added to df after read_csv

Code Sample, a copy-pastable example if possible# Your code heredf = pd.read_csv('package_infos.csv')m = df.shape[0]df['...

Pandas pd.to_datetime errors args cause inconsistent behavior wrt to timestamp limitations

Code Sampledf = pd.DataFrame({"date": ['10000101', '20180220']})# Timestamp limitations correctly raise except...

Pandas read_json should support usecols option (or hook for arbitrary transformation after each line is read)

Code Sample, a copy-pastable example if possibleimport pandas as pdpd.read_json(path_to_big_file, lines=True, usecols=so...

Pandas Index formatting in online reference

The tree index for the online reference is wrongly formatted on the page: as the tree column is not wide enough, most te...
上一页 下一页
.