Nineya
Home
Blog
Pandas numpy.std filed in element wise groupby + apply
2025-02-10 03:22:07
1081
From SO:np.random.seed([3,14159])df = pd.DataFrame( np.random.randint(10, size=(3, 3, 5)).tolist(), list('XYZ'), l...
Pandas if condition for pandas DataFrame
2025-02-10 03:22:02
715
import pandas as pddf = pd.DataFrame({'A':[15,14,90,65,20,45],'B':[98,87,45,25,12,5]})df['C'] = (df['A']>df['B']) and...
Pandas allow read_sql to avoid conversion to float
2025-02-10 03:21:58
1654
Code Sampleimport ibm_db_dbiimport ibm_dbimport pandas as pdconn_str = "DATABASE=<...>;HOSTNAME=<...>;P...
Pandas On concatenating dataframes: NoneType object is not iterable
2025-02-10 03:21:53
9926
Code Sample, a copy-pastable example if possibleimport ioimport pandascsv_file = io.StringIO("""datetime,...
Pandas If condition in DataFrame
2025-02-10 03:21:48
1660
Code Sample, a copy-pastable example if possible# Your code hereimport pandas as pddf = pd.DataFrame({'A'=[1,2,3],'B'=[3...
Pandas read_hdf throws UnicodeDecodeError with Python 3.5 and 3.6 but not with Python 2.7
2025-02-10 03:21:42
23116
Code Sample, a copy-pastable example if possibleimport pandas as pddf = pd.read_hdf('data.h5')Problem descriptionThe HDF...
Pandas BUG: Transpose fails on DataFrame with timestamps having timezone
2025-02-10 03:21:36
8565
CodeIn [33]: df = pd.DataFrame({'date1': [Timestamp('2017-05-25 14:02:23'), NaT], 'date2': [Timestamp('2017-...
Pandas Wired KeyError when indexing DatetimeIndex
2025-02-10 03:21:31
2232
import pandas as pdfrom datetime import *#Creat a sample DataFrame, df.d={'foo':1, 'bar':2}index=['2017-09-13']df=pd.Dat...
Pandas Timezone handling unittest failures on Debian
2025-02-10 03:21:26
10944
Hi,While buildling pandas 0.20.3 on Debian I had 3 timezone handling related test failures.I also get the 3 errors when ...
Pandas Documentation example for pd.read_msgpack throws exception
2025-02-10 03:21:19
680
The code example in the documentation for read_msgpack throws a SyntaxError due to Python 2 syntax for printing:In [319]...
Pandas groupby.var result is different than np.var
2025-02-10 03:21:13
1002
With the groupby.var, I don't have the same result with numpy.I use the variance formula, it seems that numpy is correct...
Pandas Timestamp modified after creating a new pd.Dataframe in Pymongo?
2025-02-10 03:21:08
1828
Not sure why original Series in my df["date_real"], after using it to create another df_release_detail the timestamp got...
Pandas Accessing all user-created metadata of a pandas Series
2025-02-10 03:21:03
2092
Code Sample, a copy-pastable example if possibleimport pandas as pdimport numpy as nps = pd.Series(np.random.randn(10))s...
Pandas .loc[...] = value returns SettingWithCopyWarning
2025-02-10 03:20:58
11048
Code Sample# My codedf.loc[0, 'column_name'] = 'foo bar'Problem descriptionThis code in Pandas 20.3 throws SettingWithCo...
Pandas pandas groupby/aggregation operation changes 'key' column dtype
2025-02-10 03:20:52
3948
reference: https://stackoverflow.com/questions/34059704/pandas-groupby-aggregation-operation-changes-key-column-dtypeWhe...
Pandas pandas_datareader.data: Google does no longer provide historical stock data?
2025-02-10 03:20:46
379
It seems that Google does no longer provide historical stock data respectively Google does no longer update the data. Is...
Pandas BUG: .iloc does not accept boolean series
2025-02-10 03:20:41
2737
Code Sample, a copy-pastable example if possible>>> s = pd.Series([3,4,5])>>> b = s > 3>>>...
Pandas DataFrame columns.values gives a reference to the original column instead of a copy
2025-02-10 03:20:34
2496
Code Sample, a copy-pastable example if possibleimport pandas as pdimport numpy as npprint "pd.__version__: %s"...
Pandas Incorrect weekofyear via .dt accessor
2025-02-10 03:20:29
2501
Incorrect dt.weekofyear calculation? I was expecting weekofyear/week for 20050101 would be 0In [1442]: dfOut[1442]: A...
Pandas Comparison between DataFrame and Series containing datetime and other types
2025-02-10 03:20:23
3012
import pandas as pdimport datetime as dtd = pd.DataFrame([[1, dt.datetime(1990,12,10)], [2, dt.datetime...
上一页
下一页
1
…
44
45
46
47
48
…
2246
.