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...

Pandas Series.add(fill_value=0) changes int dtype to float

Code Sampleimport pandas as pdpd.Series([1,2,3]).add(pd.Series([100]), fill_value=0)Problem descriptionThe resulting dty...

Pandas Failure to identify NaNs as equal in pandas.DataFrame.equals() method (as it should)

Code to replicate problemPlease see this link to download the referenced files.df = pd.read_pickle('bug_df.pickle')df2 =...

Pandas Suggestion: Temporary Variable in Pandas Data Frame

Temporary VariablesWhile dealing with data in real world, its noted that level of complexity is higher and it would be b...

Pandas Group by and bin data with respect to time

df.set_index('TIME').groupby(pd.TimeGrouper('180M'))or grouped = df.groupby(lambda x: x.hour)i am using this code to div...

Pandas Feature request: pandas.Series.gradient()

Problem descriptionIt is common to difference a time series multiple times to stationarize it.I found surprinsing pandas...

Pandas df.sort_index() leaves us with df.index.is_lexsorted()==False

Code Sample, a copy-pastable example if possibled=pd.DataFrame( [ [1,2,3], [1,2,4], [2,3,5], ...

Pandas TST: add doc-strings for fixtures

pytest --fixtures prints these out. so let's add doc-strings, then we can figure out if we have duplicates / consolidate...

Pandas unexpected timestamps behavior

If I run pd.to_datetime('now') == pd.to_datetime('now', utc=True)or pd.Timestamp('now', tz='utc') == pd.Timestamp('now')...

Pandas df.eval fails for Unary operation involving float32 column

Code Sample, a copy-pastable example if possibleimport pandas as pddf = pd.DataFrame({ 'Foo64': [1.2, 2.4, 7.24],})df...

Pandas can't subtract utc datetimes from datetime.utcnow()

Code Sample, a copy-pastable example if possible# Your code heredf = pd.DataFrame()df["time"] = pd.date_range(...

Pandas GroupBy.var() is computing sum of squares instead of variance / Returns NaN when there is only 1 instance

Code Sample, a copy-pastable example if possible# returns 10.125df = pd.DataFrame({'id': [1, 1], 'val': [0.5, 5.0]})df.g...
上一页 下一页
.