Nineya
Home
Blog
Pandas groupby aggregate function with a dictionary argument mishandles datetime64 columns with TZ info
2025-02-10 02:59:54
2370
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
2025-02-10 02:59:26
2286
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
2025-02-10 02:59:20
18411
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
2025-02-10 02:59:14
1158
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
2025-02-10 02:59:08
3456
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
2025-02-10 02:59:01
3858
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
2025-02-10 02:58:57
6706
Code Sample, a copy-pastable example if possibleimport datetimefrom pandas.tseries.offsets import CustomBusinessDayfrom ...
Pandas request for implementation of astropy.units
2025-02-10 02:58:50
648
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
2025-02-10 02:58:44
2999
# 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
2025-02-10 02:58:39
1519
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 ?
2025-02-10 02:58:34
4140
Code Sample, a copy-pastable example if possibleimport pandas as pdimport numpy as npd = {'l': ['left', 'right', 'left'...
Pandas ~
2025-02-10 02:58:29
458
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
2025-02-10 02:58:23
3019
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?
2025-02-10 02:58:17
573
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
2025-02-10 02:58:11
3066
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
2025-02-10 02:58:05
5739
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
2025-02-10 02:57:58
3431
import datetimeimport pandas as pdvalues = [("a", datetime.date(2015,1,1), 30.), ...
Pandas get_dummies feature request to preserve shape
2025-02-10 02:57:51
1050
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)
2025-02-10 02:57:45
2608
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
2025-02-10 02:57:39
9916
Code Sample, a copy-pastable example if possibleimport mysql.connectorfrom sqlalchemy import create_engineimport pandas ...
上一页
下一页
1
…
56
57
58
59
60
…
2246
.