Pandas Off By One for PeriodIndex.asfreq?

I haven't looked into this at all but is this the correct behavior?In [1]: import pandas as pd;In [2]: p1 = pd.PeriodInd...

Pandas Category dtype lost after pd.melt

Python CodeBefore pd.meltimport pandas as pddf = pd.DataFrame({'A': {0: 'a', 1: 'b', 2: 'c'}, 'B': {0...

Pandas reduce output when printing indices and columns in pandas data frame and series

I often work with pandas using big dataframes and series with multi-index or multi-column and I use the EMACS shell. O...

Pandas DatetimeIndex: 'freq' inconsistencies

Code Sample, a copy-pastable example if possibleimport pandas as pdfrom pandas.tseries.offsets import *rng = pd.date_ran...

Pandas DataFrame groupby + apply did the first function twice

In [1]: import pandas as pd ...: import numpy as np ...: In [2]: pd.__version__Out[2]: '0.20.3'In [3]: In [3]: a = p...

Pandas class inheritance

import pandas as pdclass NewDF( pd.DataFrame ): def __init__( self , data ): super().__init__( data )a = NewDF...

Pandas AttributeError: module 'pandas' has no attribute 'Data'

import pandas as pddict={ "country":["Brasil", "Russia", "India", "China", "South Africa"], "capital":["Brasilia",...

Pandas SettingWithCopyWarning while iterating on groupby results

Code Sampleimport pandas as pddf = pd.DataFrame({ 'x': range(4), 'c': list('aabb')})# These operations should have...

Pandas .loc[list-of-float-labels] yields new rows instead of KeyError

Code Sample, a copy-pastable example if possibledf = pd.DataFrame( { "a":[11, 11, 22], "...

Pandas to_csv case insensitivity

Different DataFrames saved under filenames with different cases are overwritten# Generate three different DFslower_df = ...

Pandas Detect and remove features deprecated before 0.20.0

For what I could see, there is still some functionality deprecated before 0.20.0, but which hasn't been removed, as it w...

Pandas inplace argument accepted by DataFrame.rename_axis(newname,axis=1, inplace=True) but is ignored

Code Sample, a copy-pastable example if possibleimport pandas as pddf = pd.DataFrame({'Column 1' : [1., 2., 3., 4.],...

Pandas Add abbrs for ['Y', 'M', 'W'] in Timedelta

Code Sample, a copy-pastable example if possible>>> pd.Timedelta(1, 'd')Timedelta('1 days 00:00:00')>>&gt...

Pandas DataFrame.drop() does not recognise the columns keyword argument

Code Sample, a copy-pastable example if possibleindex = np.linspace(-3, 5, 7)df = pd.DataFrame({'A': np.sin(index), 'B':...

Pandas DataFrame.apply() ignores reduce argument

Code Sampleimport numpy as npimport pandas as pdindex = np.linspace(-3, 5, 7)df = pd.DataFrame({'A': np.sin(index), 'B':...

Pandas Import error with new version of pandas

Code Sample, a copy-pastable example if possibleimport pandas as pdProblem descriptionThis issue came up while running u...

Pandas msgpack file created with 0.16 cannot be read in 0.20.3: UnicodeDecodeError

Problem descriptionI have several msgpack encoded data frames from old versions of pandas. I have seen the warnings abou...

Pandas Still getting ignored error after upgrading to panda 0.22.0

Code Sample, a copy-pastable example if possible # create grouped Pandas DataFrame gpdf = pdf.groupby('bin...

Pandas Missing int tuple index should raise KeyError, not TypeError

Code Sample, a copy-pastable example if possibleimport pandaspandas.DataFrame({"a": [0], "b": [0], &...

Pandas __finalize__ called with other as _Concatenator?

Revisiting some 6 month old class that subclasses Series and overrides __finalize__ as: def __finalize__(self, other,...
上一页 下一页
.