Pandas Index Name vanishes when calling concat on two objects with different order indices

Using pd.concat results in index name disappearing when the index is not in the same order for DataFrames being concaten...

Pandas Adding Non-US holidays in pandas.tseries.holiday

pandas.tseries.holiday has built-in only US holiday calendars. Is it possible to add other countries' holiday calendars ...

Pandas Is there any fast way to apply crossjoin or join not on two dataframes?

I try to find way to apply cross join on pandas. Failed to find useful suggestion in pandas document.Like SELECT * FROM ...

Pandas non-64-bit Indexes?

ser = pd.Series(np.arange(10, dtype=np.float128))>>> ser.dtypedtype('float128')>>> pd.Index(ser).dtype...

Pandas DataFrame groupby.first() is much slower than groupby.nth(0)

Code Sample, a copy-pastable example if possibleimport pandas as pd, numpy as npdf1 = pd.DataFrame({'c1':np.concatenate(...

Pandas No explicit way to generate a DatetimeIndex with a infinite decimals frequency

Link to the (unanswred) stackoverflow question which contains more details.Problem descriptionThe problem concerns the u...

Pandas read_csv parses header incorrectly

from io import StringIOcsv = r"""Physical\Flows.Solve,9,1,4,0,0,0,0,0,01,2,3,4,5,6,7,8,9,10""&q...

Pandas BUG: loc/iloc insertion inserts array, scalar expected

[1] df = pd.DataFrame([[1,2]])[2] df.iloc[0, 1:] = df.iloc[0, 1:].apply('{:+.2f}'.format)[3] df 0 10 1 [+2.00]...

Pandas Performance issue in Series with MultiIndex

Code SampleIn [81]: sd_series = pd.Series(range(1000), index=pd.MultiIndex.from_product([range(100), range(10)]))In [82]...

Pandas unique Datetime test failure (local, py2 only)

Can anyone else reproduce this? (python 2 only)$ pytest pandas/tests/test_algos.py::TestUnique::test_order_of_appearance...

Pandas alias for slice(None)

Having bunch of slice(None) in multilevel indexes (>=3 levels) looks pretty unreadable.Does it make sense to have an ...

Pandas Adding element to empty object Series changes dtype

Code Sample, a copy-pastable example if possibleIn [2]: s = pd.Series(dtype='object')In [3]: s.loc[0] = 1In [4]: sOut[4]...

Pandas write data to excel template and charts disappear

Code# Your code herebook = load_workbook(self.template_excel_path, data_only=True, keep_links=True)writer = pandas.Excel...

Pandas Is there a count distinct in pandas?

Problem descriptionI can't seem to find if pandas has a count unique / distinct function. I know I can unique a series /...

Pandas Inconsistent results between 'nlargest' and 'sort_values' function

df = pd.DataFrame({'a': [-2, -1, 1, 10, 8, 11, -1], 'b': list('abdceff'), 'c': [1.0, 2.0, 4.0, 3.2, np.nan, ...

Pandas Display sparse multi-index of dataframe in Pandas

In [1]: import pandas as pdfrom io import StringIO data = """code\tname\ttyp\tntf\nA5411\tWD\tAF\t\nA5411...

Pandas Doc: Incorrect exmaples for 'GroupBy.apply' functon

Example 1 and Example 2 are both incorrect for 'GroupBy.apply' functon in document.>>> df = pd.DataFrame({...

Pandas Slice with .loc includes stop index. Not consistent with Python standards?

Code Sample, a copy-pastable example if possibleimport numpy as npimport pandas as pdtest = [0,1,2,3,4]test_np = np.arra...

Pandas Denoting duplicated by specific combination of index

Code Samplepandas.DataFrame.duplicated(subset=None, keep='first')Problem descriptionPandas have a built-in method for de...

Pandas Dataframe w/ DatetimeIndex memory leak

Code Sample, a copy-pastable example if possibleimport gcimport numpy as npimport pandas as pdfrom memory_profiler impor...
上一页 下一页
.