Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 20:36
    mroeschke opened #44760
  • 20:36
    mroeschke labeled #44760
  • 20:32
    MarcoGorelli commented #44757
  • 20:17
    mroeschke labeled #44759
  • 20:17
    mroeschke opened #44759
  • 19:56
    Carreau commented #44757
  • 19:36
    jreback commented #44756
  • 19:30
    jbrockmendel commented #44756
  • 19:29
    jbrockmendel opened #44758
  • 19:00
    jreback commented #44757
  • 18:57
    jreback commented #44756
  • 18:57
    jreback labeled #44756
  • 18:57
    jreback milestoned #44756
  • 18:50
    Carreau opened #44757
  • 18:44
    jbrockmendel opened #44756
  • 18:18
    johnzangwill converted_to_draft #44755
  • 18:18
    johnzangwill opened #44755
  • 17:46
    pep8speaks commented #44267
  • 17:46
    johnzangwill synchronize #44267
  • 17:44
    Dr-Irv commented #44722
killerontherun1
@killerontherun1
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
@TomAugspurger
It looks like the C extensions weren’t (re)built. What’s the output of python setup.py build_ext -i?
Andrei Berceanu
@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
@TomAugspurger
Use StackOverflow with the pandas tag.
Andrei Berceanu
@berceanu
Thanks @TomAugspurger
killerontherun1
@killerontherun1
@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$
killerontherun1
@killerontherun1
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
@TomAugspurger
Strange. Is your Cython version up to date @killerontherun1?
killerontherun1
@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
@datapythonista
@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
@HasanShaukat
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
@grelston
Where should I go to report problems with the pandas.pydata.org website?
Gareth Elston
@grelston
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
@grelston
Similar messages from Firefox (above was Chrome).
Minho Ryang
@minhoryang
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
@Teut2711
image.png
why its not in a line?
Vishesh Mangla
@Teut2711
image.png
why isnt it working?
pankajPizone
@pankajPizone
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
@Teut2711
image.png
How to fix these labels in these?
the last one shows L2 norm
but I want it in one line
killerontherun1
@killerontherun1
@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.
killerontherun1
@killerontherun1
@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
@arunpersaud
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
@TomAugspurger
I htink this is fixed on master @arunpersaud.
Arun Persaud
@arunpersaud
@TomAugspurger thanks, should have checked there, sorry for the noise...
Kolmar Kafran
@kafran
What's the difference between df['column'] and df.column?
William Ayd
@WillAyd
Usually nothing but the former is the preferred / suggested approach
Joris Van den Bossche
@jorisvandenbossche
Kolmar Kafran
@kafran
ThankYou very much
blessedeve
@blessedeve
Hi.. am a beginner and am excited to be here. Blessings , eve
Peter Hull
@pedro-w
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
killerontherun1
@killerontherun1
@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.
Ntend7777
@Ntend7777
Hello
Ntend7777
@Ntend7777
Not
saeeddev
@sa-js
Shubham Sharma
@shubhamsharma199782
hello, anyone scrapped data from Walmart ???
i want to write a script that will search for a product and then scrap the search result from the website,
My question is that is Walmart allow scripts to scrap data and is anyone done this before
plz, i need help
Florent Piétot
@florentpietot
Hello, can anyone point me to source code that handles plotting a bar plot from a dataframe? e.g. when calling df.plot(kind='bar')
Florent Piétot
@florentpietot