GH-38341: [Python] Remove usage of pandas internals DatetimeTZBlock#38321
GH-38341: [Python] Remove usage of pandas internals DatetimeTZBlock#38321jorisvandenbossche merged 7 commits intoapache:mainfrom
Conversation
|
|
|
So it seems that pandas doesn't preserve the unit in the DatetimeArray constructor: This seems fixed on the last pandas release 2.1, so will have to keep the older code using internals for the older pandas versions. |
|
@github-actions crossbow submit -g python |
|
Revision: a133014 Submitted crossbow builds: ursacomputing/crossbow @ actions-eda4ccd5da |
|
|
|
@github-actions crossbow submit -g python |
|
Revision: dfcfa22 Submitted crossbow builds: ursacomputing/crossbow @ actions-6fbf28b83d |
|
After merging your PR, Conbench analyzed the 6 benchmarking runs that have been run so far on merge-commit 6b93c4a. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. It also includes information about 1 possible false positive for unstable benchmarks that are known to sometimes produce them. |
…lock (apache#38321) ### Rationale for this change This usage probably stems from a long time ago that it was required to specify the Block type, but nowadays it's good enough to just specify the dtype, and thus cutting down on our usage of internal pandas objects. Part of apache#35081 * Closes: apache#38341 Authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com> Signed-off-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
Rationale for this change
This usage probably stems from a long time ago that it was required to specify the Block type, but nowadays it's good enough to just specify the dtype, and thus cutting down on our usage of internal pandas objects.
We only need to ensure the data passed is 2D, because it is always for a Block in a dataframe (not series), and otherwise it complains the placement doesn't match.Part of #35081