Skip to content

String dtype: turn on by default #61722

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
env_file: [actions-310.yaml, actions-311.yaml, actions-312.yaml, actions-313.yaml]
# Prevent the include jobs from overriding other jobs
pattern: [""]
pandas_future_infer_string: ["0"]
pandas_future_infer_string: ["1"]
include:
- name: "Downstream Compat"
env_file: actions-311-downstream_compat.yaml
Expand All @@ -45,6 +45,10 @@ jobs:
env_file: actions-313-freethreading.yaml
pattern: "not slow and not network and not single_cpu"
platform: ubuntu-24.04
- name: "Without PyArrow"
env_file: actions-312.yaml
pattern: "not slow and not network and not single_cpu"
platform: ubuntu-24.04
- name: "Locale: it_IT"
env_file: actions-311.yaml
pattern: "not slow and not network and not single_cpu"
Expand All @@ -67,13 +71,9 @@ jobs:
# It will be temporarily activated during tests with locale.setlocale
extra_loc: "zh_CN"
platform: ubuntu-24.04
- name: "Future infer strings"
- name: "Past no infer strings"
env_file: actions-312.yaml
pandas_future_infer_string: "1"
platform: ubuntu-24.04
- name: "Future infer strings (without pyarrow)"
env_file: actions-311.yaml
pandas_future_infer_string: "1"
pandas_future_infer_string: "0"
platform: ubuntu-24.04
- name: "Pypy"
env_file: actions-pypy-39.yaml
Expand All @@ -88,7 +88,6 @@ jobs:
- name: "Pyarrow Nightly"
env_file: actions-311-pyarrownightly.yaml
pattern: "not slow and not network and not single_cpu"
pandas_future_infer_string: "1"
platform: ubuntu-24.04
fail-fast: false
name: ${{ matrix.name || format('{0} {1}', matrix.platform, matrix.env_file) }}
Expand All @@ -103,7 +102,7 @@ jobs:
PYTEST_TARGET: ${{ matrix.pytest_target || 'pandas' }}
# Clipboard tests
QT_QPA_PLATFORM: offscreen
REMOVE_PYARROW: ${{ matrix.name == 'Future infer strings (without pyarrow)' && '1' || '0' }}
REMOVE_PYARROW: ${{ matrix.name == 'Without PyArrow' && '1' || '0' }}
concurrency:
# https://github.saobby.my.eu.orgmunity/t/concurrecy-not-work-for-push/183068/7
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-${{ matrix.env_file }}-${{ matrix.pattern }}-${{ matrix.extra_apt || '' }}-${{ matrix.pandas_future_infer_string }}-${{ matrix.platform }}
Expand Down
2 changes: 1 addition & 1 deletion ci/deps/actions-310-minimum_versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ dependencies:
- qtpy=2.3.0
- openpyxl=3.1.2
- psycopg2=2.9.6
- pyarrow=10.0.1
- pyarrow=12.0.1
- pyiceberg=0.7.1
- pymysql=1.1.0
- pyqt=5.15.9
Expand Down
2 changes: 1 addition & 1 deletion ci/deps/actions-310.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ dependencies:
- qtpy>=2.3.0
- openpyxl>=3.1.2
- psycopg2>=2.9.6
- pyarrow>=10.0.1
- pyarrow>=12.0.1
- pyiceberg>=0.7.1
- pymysql>=1.1.0
- pyqt>=5.15.9
Expand Down
2 changes: 1 addition & 1 deletion ci/deps/actions-311-downstream_compat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ dependencies:
- qtpy>=2.3.0
- openpyxl>=3.1.2
- psycopg2>=2.9.6
- pyarrow>=10.0.1
- pyarrow>=12.0.1
- pyiceberg>=0.7.1
- pymysql>=1.1.0
- pyqt>=5.15.9
Expand Down
2 changes: 1 addition & 1 deletion ci/deps/actions-311.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ dependencies:
- pyqt>=5.15.9
- openpyxl>=3.1.2
- psycopg2>=2.9.6
- pyarrow>=10.0.1
- pyarrow>=12.0.1
- pyiceberg>=0.7.1
- pymysql>=1.1.0
- pyreadstat>=1.2.6
Expand Down
2 changes: 1 addition & 1 deletion ci/deps/actions-312.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ dependencies:
- pyqt>=5.15.9
- openpyxl>=3.1.2
- psycopg2>=2.9.6
- pyarrow>=10.0.1
- pyarrow>=12.0.1
- pyiceberg>=0.7.1
- pymysql>=1.1.0
- pyreadstat>=1.2.6
Expand Down
2 changes: 1 addition & 1 deletion ci/deps/actions-313.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ dependencies:
- pyqt>=5.15.9
- openpyxl>=3.1.2
- psycopg2>=2.9.6
- pyarrow>=10.0.1
- pyarrow>=12.0.1
- pymysql>=1.1.0
- pyreadstat>=1.2.6
- pytables>=3.8.0
Expand Down
2 changes: 1 addition & 1 deletion doc/source/getting_started/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ Dependency Minimum Version pip ex
`PyTables <https://github.com/PyTables/PyTables>`__ 3.8.0 hdf5 HDF5-based reading / writing
`zlib <https://github.com/madler/zlib>`__ hdf5 Compression for HDF5
`fastparquet <https://github.com/dask/fastparquet>`__ 2024.2.0 - Parquet reading / writing (pyarrow is default)
`pyarrow <https://github.com/apache/arrow>`__ 10.0.1 parquet, feather Parquet, ORC, and feather reading / writing
`pyarrow <https://github.com/apache/arrow>`__ 12.0.1 parquet, feather Parquet, ORC, and feather reading / writing
`PyIceberg <https://py.iceberg.apache.org/>`__ 0.7.1 iceberg Apache Iceberg reading / writing
`pyreadstat <https://github.com/Roche/pyreadstat>`__ 1.2.6 spss SPSS files (.sav) reading
`odfpy <https://github.com/eea/odfpy>`__ 1.4.1 excel Open document format (.odf, .ods, .odt) reading / writing
Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ dependencies:
- openpyxl>=3.1.2
- odfpy>=1.4.1
- psycopg2>=2.9.6
- pyarrow>=10.0.1
- pyarrow>=12.0.1
- pyiceberg>=0.7.1
- pymysql>=1.1.0
- pyreadstat>=1.2.6
Expand Down
2 changes: 1 addition & 1 deletion pandas/compat/_optional.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"openpyxl": "3.1.2",
"psycopg2": "2.9.6", # (dt dec pq3 ext lo64)
"pymysql": "1.1.0",
"pyarrow": "10.0.1",
"pyarrow": "12.0.1",
"pyiceberg": "0.7.1",
"pyreadstat": "1.2.6",
"pytest": "7.3.2",
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/config_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@ def register_converter_cb(key: str) -> None:
with cf.config_prefix("future"):
cf.register_option(
"infer_string",
True if os.environ.get("PANDAS_FUTURE_INFER_STRING", "0") == "1" else False,
False if os.environ.get("PANDAS_FUTURE_INFER_STRING", "1") == "0" else True,
"Whether to infer sequence of str objects as pyarrow string "
"dtype, which will be the default in pandas 3.0 "
"(at which point this option will be deprecated).",
Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ matplotlib = "pandas:plotting._matplotlib"

[project.optional-dependencies]
test = ['hypothesis>=6.84.0', 'pytest>=7.3.2', 'pytest-xdist>=3.4.0']
pyarrow = ['pyarrow>=10.0.1']
pyarrow = ['pyarrow>=12.0.1']
performance = ['bottleneck>=1.3.6', 'numba>=0.59.0', 'numexpr>=2.9.0']
computation = ['scipy>=1.12.0', 'xarray>=2024.1.1']
fss = ['fsspec>=2023.12.2']
aws = ['s3fs>=2023.12.2']
gcp = ['gcsfs>=2023.12.2']
excel = ['odfpy>=1.4.1', 'openpyxl>=3.1.2', 'python-calamine>=0.1.7', 'pyxlsb>=1.0.10', 'xlrd>=2.0.1', 'xlsxwriter>=3.2.0']
parquet = ['pyarrow>=10.0.1']
feather = ['pyarrow>=10.0.1']
parquet = ['pyarrow>=12.0.1']
feather = ['pyarrow>=12.0.1']
iceberg = ['pyiceberg>=0.7.1']
hdf5 = ['tables>=3.8.0']
spss = ['pyreadstat>=1.2.6']
Expand Down Expand Up @@ -98,7 +98,7 @@ all = ['adbc-driver-postgresql>=0.10.0',
'odfpy>=1.4.1',
'openpyxl>=3.1.2',
'psycopg2>=2.9.6',
'pyarrow>=10.0.1',
'pyarrow>=12.0.1',
'pyiceberg>=0.7.1',
'pymysql>=1.1.0',
'PyQt5>=5.15.9',
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ numexpr>=2.9.0
openpyxl>=3.1.2
odfpy>=1.4.1
psycopg2-binary>=2.9.6
pyarrow>=10.0.1
pyarrow>=12.0.1
pyiceberg>=0.7.1
pymysql>=1.1.0
pyreadstat>=1.2.6
Expand Down
Loading