[BUG] `.columns.equals()` with empty content brings inconsistent results
- Dominant language
- C++
- Stars
- 9.8k
- Forks
- 1.1k
- Avg merge
- 3d 6m
- Merged PRs (30d)
- 278
Description
**Describe the bug**
`.columns.equals()` with empty content brings inconsistent results with those of Pandas.
**Steps/Code to reproduce bug**
```python
import pandas as pd
t0 = pd.DataFrame()
result = t0.columns.equals(pd.Index([]))
print("Pandas Result:")
print(result)
import cudf.pandas
cudf.pandas.install()
import pandas as pd
t0 = pd.DataFrame()
result = t0.columns.equals(pd.Index([]))
print("CuDF Pandas Result:")
print(result)
```
```bash
Pandas Result:
True
CuDF Pandas Result:
False
```
**Expected behavior**
`cudf.pandas` results are consistent with those of Pandas.
**Environment overview (please complete the following information)**
- Environment location: Bare-metal
- Method of cuDF install: conda
**Environment details**
Click here to see environment details
***OS Information***
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=24.04
DISTRIB_CODENAME=noble
DISTRIB_DESCRIPTION="Ubuntu 24.04 LTS"
PRETTY_NAME="Ubuntu 24.04 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04 LTS (Noble Numbat)"
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=noble
LOGO=ubuntu-logo
Linux rog 6.14.0-37-generic #37~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Nov 20 10:25:38 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
***GPU Information***
Mon Jan 19 03:47:04 2026
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 580.95.05 Driver Version: 580.95.05 CUDA Version: 13.0 |
+-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce RTX 4090 Off | 00000000:01:00.0 Off | Off |
| 36% 34C P2 79W / 450W | 848MiB / 24564MiB | 0% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| 0 N/A N/A 1958 G /usr/lib/xorg/Xorg 4MiB |
| 0 N/A N/A 3038 C+G ...c/gnome-remote-desktop-daemon 392MiB |
| 0 N/A N/A 3966377 C /usr/bin/python3 394MiB |
+-----------------------------------------------------------------------------------------+
***CPU***
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 39 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 16
On-line CPU(s) list: 0-15
Vendor ID: GenuineIntel
Model name: 11th Gen Intel(R) Core(TM) i7-11700 @ 2.50GHz
CPU family: 6
Model: 167
Thread(s) per core: 2
Core(s) per socket: 8
Socket(s): 1
Stepping: 1
CPU(s) scaling MHz: 62%
CPU max MHz: 4900.0000
CPU min MHz: 800.0000
BogoMIPS: 4992.00
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb ssbd ibrs ibpb stibp ibrs_enhanced fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx avx512f avx512dq rdseed adx smap avx512ifma clflushopt intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm md_clear flush_l1d arch_capabilities
L1d cache: 384 KiB (8 instances)
L1i cache: 256 KiB (8 instances)
L2 cache: 4 MiB (8 instances)
L3 cache: 16 MiB (1 instance)
NUMA node(s): 1
NUMA node0 CPU(s): 0-15
Vulnerability Gather data sampling: Vulnerable
Vulnerability Ghostwrite: Not affected
Vulnerability Indirect target selection: Mitigation; Aligned branch/return thunks
Vulnerability Itlb multihit: Not affected
Vulnerability L1tf: Not affected
Vulnerability Mds: Not affected
Vulnerability Meltdown: Not affected
Vulnerability Mmio stale data: Mitigation; Clear CPU buffers; SMT vulnerable
Vulnerability Reg file data sampling: Not affected
Vulnerability Retbleed: Mitigation; Enhanced IBRS
Vulnerability Spec rstack overflow: Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2: Mitigation; Enhanced / Automatic IBRS; IBPB conditional; PBRSB-eIBRS SW sequence; BHI SW loop, KVM SW loop
Vulnerability Srbds: Not affected
Vulnerability Tsa: Not affected
Vulnerability Tsx async abort: Not affected
Vulnerability Vmscape: Not affected
***CMake***
/usr/bin/cmake
cmake version 3.28.3
CMake suite maintained and supported by Kitware (kitware.com/cmake).
***g++***
/usr/bin/g++
g++ (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
***nvcc***
/usr/bin/nvcc
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2023 NVIDIA Corporation
Built on Fri_Jan__6_16:45:21_PST_2023
Cuda compilation tools, release 12.0, V12.0.140
Build cuda_12.0.r12.0/compiler.32267302_0
***Python***
/home/xxx/anaconda3/envs/cudf25.12.00/bin/python
Python 3.10.19
***Environment Variables***
PATH : /home/xxx/anaconda3/envs/cudf25.12.00/bin:/home/xxx/anaconda3/condabin:/home/xxx/anaconda3/bin:/home/xxx/.vscode-server/cli/servers/Stable-994fd12f8d3a5aa16f17d42c041e5809167e845a/server/bin/remote-cli:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/path/to/driver:/home/xxx/.vscode-server/extensions/ms-python.debugpy-2025.18.0/bundled/scripts/noConfigScripts
LD_LIBRARY_PATH :
NUMBAPRO_NVVM :
NUMBAPRO_LIBDEVICE :
CONDA_PREFIX : /home/xxx/anaconda3/envs/cudf25.12.00
PYTHON_PATH :
***conda packages***
/home/xxx/anaconda3/condabin/conda
# packages in environment at /home/xxx/anaconda3/envs/cudf25.12.00:
#
# Name Version Build Channel
_libgcc_mutex 0.1 main
_openmp_mutex 5.1 1_gnu
bzip2 1.0.8 h5eee18b_6
ca-certificates 2025.12.2 h06a4308_0
cachetools 6.2.4 pypi_0 pypi
cuda-bindings 12.9.5 pypi_0 pypi
cuda-core 0.3.2 pypi_0 pypi
cuda-pathfinder 1.3.3 pypi_0 pypi
cuda-python 12.9.5 pypi_0 pypi
cuda-toolkit 12.9.1 pypi_0 pypi
cudf-cu12 25.12.0 pypi_0 pypi
cupy-cuda12x 13.6.0 pypi_0 pypi
expat 2.7.3 h7354ed3_4
fastrlock 0.8.3 pypi_0 pypi
fsspec 2026.1.0 pypi_0 pypi
ld_impl_linux-64 2.44 h153f514_2
libcudf-cu12 25.12.0 pypi_0 pypi
libexpat 2.7.3 h7354ed3_4
libffi 3.4.4 h6a678d5_1
libgcc 15.2.0 h69a1729_7
libgcc-ng 15.2.0 h166f726_7
libgomp 15.2.0 h4751f2c_7
libkvikio-cu12 25.12.0 pypi_0 pypi
libnsl 2.0.0 h5eee18b_0
librmm-cu12 25.12.0 pypi_0 pypi
libstdcxx 15.2.0 h39759b7_7
libstdcxx-ng 15.2.0 hc03a8fd_7
libuuid 1.41.5 h5eee18b_0
libxcb 1.17.0 h9b100fa_0
libzlib 1.3.1 hb25bd0a_0
llvmlite 0.44.0 pypi_0 pypi
markdown-it-py 4.0.0 pypi_0 pypi
mdurl 0.1.2 pypi_0 pypi
ncurses 6.5 h7934f7d_0
numba 0.61.2 pypi_0 pypi
numba-cuda 0.19.2rc0 pypi_0 pypi
numpy 2.2.6 pypi_0 pypi
nvidia-cuda-cccl-cu12 12.9.27 pypi_0 pypi
nvidia-cuda-nvcc-cu12 12.9.86 pypi_0 pypi
nvidia-cuda-nvrtc-cu12 12.9.86 pypi_0 pypi
nvidia-cuda-runtime-cu12 12.9.79 pypi_0 pypi
nvidia-nvjitlink-cu12 12.9.86 pypi_0 pypi
nvtx 0.2.14 pypi_0 pypi
openssl 3.0.18 hd6dcaed_0
pandas 2.3.3 pypi_0 pypi
pip 25.3 pyhc872135_0
pthread-stubs 0.3 h0ce48e5_1
pyarrow 22.0.0 pypi_0 pypi
pygments 2.19.2 pypi_0 pypi
pylibcudf-cu12 25.12.0 pypi_0 pypi
python 3.10.19 h6fa692b_0
python-dateutil 2.9.0.post0 pypi_0 pypi
pytz 2025.2 pypi_0 pypi
rapids-logger 0.2.3 pypi_0 pypi
readline 8.3 hc2a1206_0
rich 14.2.0 pypi_0 pypi
rmm-cu12 25.12.0 pypi_0 pypi
setuptools 80.9.0 py310h06a4308_0
six 1.17.0 pypi_0 pypi
sqlite 3.51.1 he0a8d7e_0
tk 8.6.15 h54e0aa7_0
typing-extensions 4.15.0 pypi_0 pypi
tzdata 2025.3 pypi_0 pypi
wheel 0.45.1 py310h06a4308_0
xorg-libx11 1.8.12 h9b100fa_1
xorg-libxau 1.0.12 h9b100fa_0
xorg-libxdmcp 1.1.5 h9b100fa_0
xorg-xorgproto 2024.1 h5eee18b_1
xz 5.6.4 h5eee18b_1
zlib 1.3.1 hb25bd0a_0
**Additional context**
Add any other context about the problem here.
Contributor guide
Assessment
This issue has not been assessed yet.