mroeschke on master
ENH: Add support for more place… (compare)
jreback on master
REF: share ExtensionIndex astyp… (compare)
jreback on master
REF: share Index subclass forma… (compare)
Hi everyone, I'm facing this error while trying to run a pytest test. The test ran fine a few days ago; however, for a long time now, I'm facing this error. Not sure what's causing it and I've been unable to resolve it for hours now.
Here's the command I'm giving:
cd /workspaces/pandas/pandas/tests/indexes/datetimes pytest -vv test_indexing.py::TestIndexerBetweenTime::test_indexer_between_time
Here's the error:
ImportError while loading conftest '/workspaces/pandas/pandas/conftest.py'. ../../../__init__.py:137: in <module> from pandas.io.api import ( ../../../io/api.py:8: in <module> from pandas.io.excel import ( ../../../io/excel/__init__.py:1: in <module> from pandas.io.excel._base import ( ../../../io/excel/_base.py:18: in <module> from pandas._libs.parsers import STR_NA_VALUES E ImportError: /workspaces/pandas/pandas/_libs/parsers.cpython-38-x86_64-linux-gnu.so: undefined symbol: str_to_int64
Reposting again, I deleted my post by mistake.
As of now there's no support for drop duplicate columns. API currently as
.drop_duplicated, which removes duplicate rows. Can we add
axis parameter to
0 -> drop rows and
1 -> drop columns.
df X1 X2 Y1 Y2 0.0 0.0 6.0 6.0 3.0 3.0 7.1 7.1 7.6 7.6 1.2 1.2 # Desired Output X1 Y1 0 0.0 6.0 1 3.0 7.1 2 7.6 1.2
There are a few overaround. One, transpose, drop_duplicate and transpose back.
np.unique over axis 1
def drop_duplicate_cols(df): uniq, idxs = np.unique(df, return_index=True, axis=1) return pd.DataFrame(uniq, index=df.index, columns=df.columns[idxs]) drop_duplicate_cols(X) X1 Y1 0 0.0 6.0 1 3.0 7.1 2 7.6 1.2
Is there some reason to not add drop_duplicates over axis 1?
dtypes(I wrote an answer on StackOverflow: https://stackoverflow.com/a/69323395/12416453). If the implementation I proposed is ok I can go ahead and write a PR.
I'm trying to get pandas to work on Ubuntu server 20.04.3 LTS installed on a Raspberry pi, with python 3.8. I've tried everything I could find on the forums to get this to work.
using pip, the 1.3.3 installation hangs. With apt python3-pandas, it installs v0.25. I'm using 1.1.0 functionalities so that doesn't work.
I decided to try building it from source. I'm stuck at this point where it seems to hang again:
ubuntu@raspi001:~/pandasrepo/pandas$ python3 setup.py install --user running install running bdist_egg running egg_info writing pandas.egg-info/PKG-INFO writing dependency_links to pandas.egg-info/dependency_links.txt writing entry points to pandas.egg-info/entry_points.txt writing requirements to pandas.egg-info/requires.txt writing top-level names to pandas.egg-info/top_level.txt reading manifest file 'pandas.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' no previously-included directories found matching 'doc/build' warning: no previously-included files matching '*.so' found anywhere in distribution warning: no previously-included files matching '*~' found anywhere in distribution warning: no previously-included files matching '.DS_Store' found anywhere in distribution warning: no previously-included files matching '#*' found anywhere in distribution warning: no previously-included files matching '*.py[ocd]' found anywhere in distribution writing manifest file 'pandas.egg-info/SOURCES.txt' installing library code to build/bdist.linux-armv7l/egg running install_lib running build_py UPDATING build/lib.linux-armv7l-3.8/pandas/_version.py set build/lib.linux-armv7l-3.8/pandas/_version.py to '1.4.0.dev0+857.gd30aeeba0c' running build_ext building 'pandas._libs.algos' extension arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DNPY_NO_DEPRECATED_API=0 -I./pandas/_libs -Ipandas/_libs/src/klib -I/usr/lib/python3/dist-packages/numpy/core/include -I/usr/include/python3.8 -c pandas/_libs/algos.c -o build/temp.linux-armv7l-3.8/pandas/_libs/algos.o ^Cinterrupted
I'm at a point where I have no clue what to try next. I figured you guys might have an idea of what's going on?
Anyone else ran in the following issue with the newer versions of pip while building a dev environment?
INFO: pip is looking at multiple versions of <package name> to determine which version is compatible with other requirements. After an hour I cancelled it.
--no-deps does not solve it, since none of the dependencies of the packages will be installed.
blackwith vscode before? I have very absurd interactions with black and when I modify and save a file, it reformats almost everything altering lines that my change has nothing to do with. I would appreciate any help.