Pandas Assign dataframe from another and add a column original also adds it to new df

Code Sample, a copy-pastable example if possible# Your code herex = pd.DataFrame([1,2,3])y = xy["test"] = &quo...

Pandas Subtracting empty Series with dtype datetime64[ns]

Code Sample, a copy-pastable example if possibledf = pd.DataFrame({ 'dates_1' : pd.date_range(start='2015-01-01',...

Pandas str.find returns dtype: float64

str.find fails to return integersAs per the docs it should return Series/Index of integer valuesCode Sample, a copy-past...

Pandas to_sql is too slow

Code Sample,df_name.to_sql('table_name', schema = 'public', con = engi...

Pandas read_hdf is not read-threadsafe on MAC and Windows

Problem descriptionpd.read_hdf() segfaults when called from multiple threads in read only mode.From the documentation I ...

Pandas DataFrame with PeriodIndex causes KeyError on get_value

Code Sample, a copy-pastable example if possiblefrom pandas import to_datetime, period_range, DataFrameimport pandas as ...

Pandas Assigning new dataframe to cell in dataframe results in nan

Code Sample, a copy-pastable example if possibleimport pandas as pdimport numpy as np# Create a simple nested DataFramed...

Pandas Timestamp subtraction should work for differing timezones

Code Sample, a copy-pastable example if possibleIn [1]: import pandas as pdIn [2]: pd.Timestamp("2016-01-01", ...

Pandas DataFrame slice of dtype np.float64 returns all zeros when using .loc for row/column selection

Hi all,I noticed this bug today when I was trying to cast a large table (~56,000 rows by 8500 columns) from np.float64 t...

Pandas Length/size of datetime groups cast as datetimes

In [7]: pandas.Series([datetime.datetime.utcnow()]*4).groupby([1, 1, 2, 2]).agg('size')Out[7]: 1 22 2dtype: int64I...

Pandas How to filter excel data by row?

How to filter excel data by row? Say my data is for f in glob.glob('/Users/seb/PycharmProjects/data-transform/data/[I..O...

Pandas pandas.io.gbq.to_gbq creates duplicate rows, pandas==0.19.2

df.to_gbq(data, dataset, chunksize=10000, verbose=False, reauth=False, if_exists='append', private_key=private_key)Probl...

Pandas Inconsistent behavior of loc and iloc for MultiIndex

panel = pd.util.testing.makePanel(nper=2).to_frame()panel.loc['2000-01-03']panel.iloc[0]Problem descriptioniloc returns ...

Pandas Problem in Pandas 0.18.1 with Python 3.5

Code Sample, a copy-pastable example if possible# Your code hereimport pandas as pdimport numpy as npu=pd.DataFrame([np....

Pandas Duplicate columns in DataFrame do not show up in DataFrame.itertuples

Code Sample, a copy-pastable example if possible>>> import pandas>>> df = pandas.read_csv('test.csv')&...

Pandas ValueError("Cannot describe a DataFrame without columns") ValueError: Cannot describe a DataFrame without columns

This is my TestWorkbook.xlsx in same location as my python script:Data Time Variable Value08/01/17 06:00:30 ...

Pandas lines kwarg in pd.read_json

Code Sample, a copy-pastable example if possible with open("clean.json", "r+") as data: df...

Pandas Line breaks in Exception messages

Code Sample, a copy-pastable example if possibleimport pandas as pddf = pd.DataFrame({'a': [1, '2']})df.to_hdf('tmp.h5',...

Pandas CategoricalData is converted to Objects when merging dataframes

Code SampletestData = pd.DataFrame(data={"id" : range(10), "cat" : pd.Categorical(["a"]*5 ...

Pandas Unable to control import of 1st column from Excel file (with multi-row header)

Let's assume there are two excel files with almost identical content:file_1.xlsx:file_2.xlsx:Then reading first file in ...
上一页 下一页
.