Pandas groupby aggregate function with a dictionary argument mishandles datetime64 columns with TZ info

Code Sample, a copy-pastable example if possiblefrom datetime import datetimeimport pandas as pdimport pytztz = pytz.tim...

Pandas BUG: to_datetime with utc=True for Series

Code Sample, a copy-pastable example if possibleIn [2]: ts = 1.4884427244831782e+18In [3]: pd.to_datetime(ts, utc=True)O...

Pandas Pandas ticker to ohlc

pandas (0.19.2)rows is a list of dict from mysql.rows example[{'date': datetime.datetime(2017, 3, 21, 13, 27, 20), 'tid'...

Pandas data input column name

Code Sample, a copy-pastable example if possiblea = df[(df.Gold>=1)&(df.Gold.1>=1)]Problem descriptionwhen I i...

Pandas Groupby on date component results in corrupt DataFrame

Code Sample, a copy-pastable example if possibleIn [3]: df1 = pd.DataFrame({c : np.random.random(4) for c in ['a', 'b']}...

Pandas to_hdf5 copies data, causes MemoryError

Code Sample, a copy-pastable example if possibleresult.to_hdf(op.join(args.output_dir, "merged.hd5"), "da...

Pandas date_range with CustomBusinessDay receives TypeError

Code Sample, a copy-pastable example if possibleimport datetimefrom pandas.tseries.offsets import CustomBusinessDayfrom ...

Pandas request for implementation of astropy.units

The astropy package is excellent for calculations with units!Is there a method to pass the Units (from astropy import un...

Pandas DateOffset + (Timestamp Series with NaT) = wrong results

# Your code hereimport pandas as pdt = pd.Series([pd.Timestamp("2016-09-01", tz="US/Eastern") + k*pd...

Pandas Signature of get_level_values not as documented

import numpy as np import pandas as pddata = pd.DataFrame(np.arange(8).reshape(2,4)).set_index([0,1])print(type(data.ind...

Pandas Sum of pd.DataFrame.groupby.sum containing NaN should return NaN ?

Code Sample, a copy-pastable example if possibleimport pandas as pdimport numpy as npd = {'l': ['left', 'right', 'left'...

Pandas ~

Code Sample, a copy-pastable example if possible# Your code hereProblem description[this should explain why the current ...

Pandas Append Series to Series in place

As I can see, this is the intended way to append one Series to anotherimport pandass = pandas.Series([0, 1, 2])new_s = s...

Pandas How does the community feel about type hinting?

I know some people are philosophically opposed to it. I'm not sure where the pandas community stands, but I feel pandas...

Pandas read_excel with multi-index columns and index_col=None, returns an index column

read_excel() seems to give the same results for a multi-index column file if index_col=None or index_col=0. Using the f...

Pandas dataframe.replace() does not work on a subset of rows

Code Sample, a copy-pastable example if possible# Your code heredata = pd.DataFrame( {'ab' : ['A','B','A','A','B'], 'num...

Pandas Set multilevel index changes date to datetime in dataframe

import datetimeimport pandas as pdvalues = [("a", datetime.date(2015,1,1), 30.), ...

Pandas get_dummies feature request to preserve shape

I use the get_dummies function while feature engineering for scikit-learn classifiers. Something I realized is if a valu...

Pandas Pandas crash with : ValueError: Buffer has wrong number of dimensions (expected 2, got 1)

Code Sample, a copy-pastable example if possibleimport pandas as pdimport datetimeimport numpy as npbase = datetime.date...

Pandas df.to_sql(...) crashes when attempting to make a new table

Code Sample, a copy-pastable example if possibleimport mysql.connectorfrom sqlalchemy import create_engineimport pandas ...
上一页 下一页
.