Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • 05:59
    mroeschke synchronize #44630
  • 05:49
    mroeschke synchronize #44634
  • 05:14
    mroeschke labeled #44663
  • 05:14
    mroeschke labeled #44663
  • 05:14
    mroeschke milestoned #44663
  • 05:08
    mroeschke synchronize #44630
  • 05:04
    nickleus27 commented #44664
  • 05:03
    nickleus27 edited #44664
  • 05:00
    jreback commented #44664
  • 04:55
    Varun270 commented #44627
  • 04:45
    mroeschke synchronize #44634
  • 04:40
    lithomas1 edited #44662
  • 04:38
    ivanovmg synchronize #38062
  • 03:59
    jbrockmendel opened #44665
  • 03:59

    jbrockmendel on revert-44659-xfails3

    Revert "TST: de-xfail (#44659)"… (compare)

  • 03:50
    nickleus27 opened #44664
  • 03:46
    jbrockmendel synchronize #44655
  • 03:40
    jreback commented #44612
  • 03:38
    jbrockmendel opened #44663
  • 03:31
    mroeschke commented #44612
Carlos P Ceballos
@r063r3 you must have invisible characters which are not null. Sometimes visualizing the file in Excel just increases frustration, you can open the file in your editor to find the true value of them, or use iloc and target those rows and columns to get the value in that cell and then you can filter that out
Thank you...it was this....there are empty espaces in the start of each row...
Now, I am having other problem in this file...
One of the column has a data with 12 numbers. i.e, 12345678910...when I import in Pandas, the columns shows something like that: 123456+98
Someone knows what is message erro means? OutOfBoundsDatetime: Out of bounds nanosecond timestamp: 3000-01-01 00:00:00
Younggun Kim
FYI. We are going to sprint on pandas at PyCon KR from 15th Aug 10 AM (UTC+9).
Cera Kamikazi
Kolmar Kafran
@r063r3 pd.Timestamp.max and pd.Timestamp.min goes from 1677 to 2262. Pandas can't handle the year 3000. You should use pd.Period to handle this date.
Hey, not sure what's happening while trying to build pandas from source. I followed the instructions from here(https://pandas.pydata.org/pandas-docs/stable/development/contributing.html#where-to-start). Would be awesome if someone could help me out. This is the error I get after running the installation.
(pandas-dev) Mathews-MacBook-Pro:cpython mathewgeorge$ python3
Python 3.7.2 (v3.7.2:9a3ffc0492, Dec 24 2018, 02:44:43) 
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/mathewgeorge/projects/my_projects/pandas/pandas/__init__.py", line 55, in <module>
    from pandas.core.api import (
  File "/Users/mathewgeorge/projects/my_projects/pandas/pandas/core/api.py", line 5, in <module>
    from pandas.core.arrays.integer import (
  File "/Users/mathewgeorge/projects/my_projects/pandas/pandas/core/arrays/__init__.py", line 1, in <module>
    from .base import (  # noqa: F401
  File "/Users/mathewgeorge/projects/my_projects/pandas/pandas/core/arrays/base.py", line 14, in <module>
    from pandas.compat.numpy import function as nv
  File "/Users/mathewgeorge/projects/my_projects/pandas/pandas/compat/numpy/function.py", line 28, in <module>
    from pandas.util._validators import (
  File "/Users/mathewgeorge/projects/my_projects/pandas/pandas/util/__init__.py", line 3, in <module>
    from pandas.core.util.hashing import hash_array, hash_pandas_object  # noqa
  File "/Users/mathewgeorge/projects/my_projects/pandas/pandas/core/util/hashing.py", line 11, in <module>
    from pandas.core.dtypes.cast import infer_dtype_from_scalar
  File "/Users/mathewgeorge/projects/my_projects/pandas/pandas/core/dtypes/cast.py", line 9, in <module>
    from pandas.util._validators import validate_bool_kwarg
  File "/Users/mathewgeorge/projects/my_projects/pandas/pandas/util/_validators.py", line 7, in <module>
    from pandas.core.dtypes.common import is_bool
  File "/Users/mathewgeorge/projects/my_projects/pandas/pandas/core/dtypes/common.py", line 11, in <module>
    from pandas.core.dtypes.dtypes import (
  File "/Users/mathewgeorge/projects/my_projects/pandas/pandas/core/dtypes/dtypes.py", line 17, in <module>
    from .inference import is_bool, is_list_like
  File "/Users/mathewgeorge/projects/my_projects/pandas/pandas/core/dtypes/inference.py", line 26, in <module>
    is_list_like = lib.is_list_like
AttributeError: module 'pandas._libs.lib' has no attribute 'is_list_like'
Bit more info: I had already contributed a bit to fixing docstrings earlier. I just updated my fork and my master. Tried the above and encountered the same error. Tried rebuilding, and also made sure my c compiler was installed.
Tom Augspurger
It looks like the C extensions weren’t (re)built. What’s the output of python setup.py build_ext -i?
Andrei Berceanu
Is this a suitable place to ask user questions about pandas?
Or is there something like a separate slack channel for that?
Tom Augspurger
Use StackOverflow with the pandas tag.
Andrei Berceanu
Thanks @TomAugspurger
@TomAugspurger : It gives me this
(pandas-dev) Mathews-MacBook-Pro:pandas mathewgeorge$ python3 setup.py build_ext -i
running build_ext
(pandas-dev) Mathews-MacBook-Pro:pandas mathewgeorge$
I tried rebuilding the extension with the --force flag and that seemed to at least start the process. It built till the end, after which I proceeded to install pandas using python3 -m pip install -e .. Still the same error :(.
Tom Augspurger
Strange. Is your Cython version up to date @killerontherun1?
I believe so. I have updated the master of my cython repository locally. Should I be doing something to build cython? Since the "contributing to pandas" doc mentioned I shouldn't have to do the configure and make steps, I skipped that and just installed the compiler via xcode (which already existed).
I tried reinstalling via xcode post my update of the cython repository.
Marc Garcia
@killerontherun1 can you make sure your copy of the pandas source is updated (i.e. git fetch upstream && git merge upstream/master), and in the root of the project run conda env update if you already have a conda environment, or conda env create if you don't. Then a python setup.py build_ext --inplace --force should work, otherwise there is something weird going on
Hasan Shaukat
I have a dataframe df = pd.DataFrame({'col1':['a', 'b', 'a', 'b', 'c']})
I want to make an 'is_first' column which would have [1,1,0,0,1] (1 if the col1 value appeared for the first time, 0 otherwise)
Any pandorable, vectorized approach for this?
Gareth Elston
Where should I go to report problems with the pandas.pydata.org website?
Gareth Elston
Specifically, https://pandas.pydata.org/pandas-docs/stable/pandas.pdf tells me that "pandas.pydata.org redirected you too many times," gives me an "ERR_TOO_MANY_REDIRECTS" message, and suggests that I "Try clearing your cookies." It tells me the same thing even after I have cleared all my cookies and set the options to allow cookies.
Gareth Elston
Similar messages from Firefox (above was Chrome).
Minho Ryang
Ping, Is there anybody here? My friend @proost is trying to resolve #20519, and needs some help to get a clue. (He chose this issue at PyConKR19 Sprint, and got lost in codes.)
Vishesh Mangla
why its not in a line?
Vishesh Mangla
why isnt it working?
Hello guys, i'm getting error while dataframe.to_parquet(fn,engine='pyarrow')
ImportError: Missing optional dependency 'pyarrow'. pyarrow is required for parquet support. Use pip or conda to install pyarrow.
but i have install pyarrow with pip and conda
still getting error
Vishesh Mangla
How to fix these labels in these?
the last one shows L2 norm
but I want it in one line
@datapythonista : There's something weird going on. To be sure, i reinstalled conda, I've fetched as instructed, and built with the force flag. It built successfully, and to my dismay, when I try to import it the same error as before occurs indicating the c extensions did not get built. I've got the stdout of my build command in a file, which I'd be happy to send across. My python version is Python 3.7.4 (default, Aug 13 2019, 15:17:50) and gcc --version gives me
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1 Apple LLVM version 10.0.0 (clang-1000.10.44.4) Target: x86_64-apple-darwin18.2.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin.
@HasanShaukat Usually better suited for stackoverflow. But you could do this
>>> from pandas import DataFrame as df, concat
>>> tbl = df({'col1':['a', 'b', 'a', 'b', 'c']})
>>> test = concat([tbl,tbl.duplicated().astype(int)],axis=1);test[0] = test[0].apply(lambda x: 1 if x==0 else 0)
>>> test
  col1  0
0    a  1
1    b  1
2    a  0
3    b  0
4    c  1
Arun Persaud
just trying to upgrade pandas for a linux distribution and ran into an issue that some test use for example "subprocess.check_output(["python", "-c", code])..." where python is hardcoded, but for the linux distribution python might be called python3 for example and the test fails... perhaps sys.executable would be better? is this something one should report in the bug tracker or what is the best place to report this?
Tom Augspurger
I htink this is fixed on master @arunpersaud.
Arun Persaud
@TomAugspurger thanks, should have checked there, sorry for the noise...
Kolmar Kafran
What's the difference between df['column'] and df.column?
William Ayd
Usually nothing but the former is the preferred / suggested approach
Joris Van den Bossche
Kolmar Kafran
ThankYou very much
Hi.. am a beginner and am excited to be here. Blessings , eve
Peter Hull
Hi. Is there a way to select columns from a DataFrameGroupBy?
I wanted to group data once, then select several columns in turn without having to re-do the grouping each time.
df.groupby('x')[['y']] doesn't do what I expected it to.
Asked on SO, but I'm not sure if I'm asking in the right way... https://stackoverflow.com/questions/57629784/select-column-from-groupby-for-boxplot
@datapythonista @TomAugspurger : FYI. Figured out the issue, in case anyone else faces this, it was an env (conda) problem. I did not remove the environment properly. Successfully got the env set up again and it is fixed.