On Fri, 13 May 2016, 06:52 Jake Kobs, wrote:
> Thank you for the help..I think I'm getting closer, but I feel like after
> they enter an invalid number, it should reset the invalid number(s)
> somehow. Here's my updated code:
>
> ---
Dirk Bächle writes:
> ...
> My questions
>
>
> - Is this a good approach, that I could use for other parts of the
> architecture as well, e.g. the Node class mentioned above?
You might look at the "adpater" pattern.
It is heavily used in Zope - and there looks something like:
*
Paul Rubin wrote:
You can't instantiate T by saying
x = T()
and expecting to get back some value that is (indeterminately) an int or
a string.
Unless it's Python 6000 running on a quantum computer...
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
From: christopher.amor...@mail.citytech.cuny.edu
Sent: Thursday, May 12, 2016 7:35 PM
To: python-list@python.org
Subject: Fw: Question about issue with opening Python
I downloaded an older version of Python and for about an hour it was working,
but started t
On May 13, 2016 9:22 AM, "christopher.amor...@mail.citytech.cuny.edu" <
christopher.amor...@mail.citytech.cuny.edu> wrote:
>
>
>
>
>
>
> From: christopher.amor...@mail.citytech.cuny.edu
> Sent: Thursday, May 12, 2016 7:35 PM
> To: python-list@python.org
> Subject: F
On Fri, 13 May 2016 11:05 pm, christopher.amor...@mail.citytech.cuny.edu
wrote:
> I downloaded an older version of Python and for about an hour it was
> working, but started to get the same error message I received when using
> the latest version of Python.
Do you have a question, or are you just
On 05/13/2016 07:05 AM, christopher.amor...@mail.citytech.cuny.edu wrote:
> I downloaded an older version of Python and for about an hour it was
> working, but started to get the same error message I received when
> using the latest version of Python.
You'll have to tells us what the error was tha
On 05/13/2016 07:47 AM, christopher.amor...@mail.citytech.cuny.edu wrote:
> Hello,
>
> Thank you for your reply. It says "IDLE's subprocess didn't make
> connection. Either IDLE can't start a subprocess or personal firewall
> software is blocking the connection." It worked after the first hour
> o
Thank you so much! I finally got it. :)
--
https://mail.python.org/mailman/listinfo/python-list
My "vision" if you will for this site is one which should have these basic
functionalities :
1) A forum for students , educators, parents and lawyers to post and discuss
issues about education, fees, admissions process , visa issues.
2) A search engine for users to well (search for stuff lol)
Sent from Yahoo Mail on Android
On Fri, 13 May, 2016 at 16:59, Aidan Silcock
wrote: HelloI have tried to download python 3.5.1 today and it has downloaded
but each time I try to open it it says I need to Modify, Repair or Uninstall
the program.I have tried repairing it neumerous times a
Hi Team,
Iam on python 2.7 and Linux . I need inputs on the below program ,
Iam skipping the unittest from setUpClass in following way # raise
unittest.SkipTest(message)
The test are getting skipped but I have two problem .
(1) This script is in turn read by other scripts which consid
I lost my indexes after grouping in Pandas.
I managed to rest_index and got back the index column.
But How can I get back a index row?
Regards.
David
--
https://mail.python.org/mailman/listinfo/python-list
On Friday, May 13, 2016 at 2:04:53 AM UTC+2, Sturla Molden wrote:
> You must own the GIL before you can safely use the Python C API, object
> creation and refcounting in particular. Use the "Simplified GIL API" to
> grab the GIL and release it when you are done.
I've now read about the GIL and it
In Aidan Silcock
writes:
> On Fri, 13 May, 2016 at 16:59, Aidan Silcock
> wrote:
> Hello I have tried to download python 3.5.1 today and it has downloaded
> but each time I try to open it it says I need to Modify, Repair or
> Uninstall the program.I have tried repairing it neumerous times an
On Sat, 14 May 2016 02:23 am, Ganesh Pal wrote:
> Hi Team,
>
> Iam on python 2.7 and Linux . I need inputs on the below program ,
"I am" is two words, not one. I hope you wouldn't write "Youare"
or "Heis" :-) Whenever you write "Iam", I read it as the name "Ian", which
is very distracting.
On Friday, May 13, 2016 at 12:05:33 PM UTC-4, Cai Gengyang wrote:
> edx.org is a great example , perhaps a competitor / clone with different
> functionalities and better design , more videos, graphics , more interactive
As I mentioned in a previous reply, edx.org runs on Open edX, which is
open
On Fri, May 13, 2016 at 12:27 PM David Shi via Python-list <
python-list@python.org> wrote:
> I lost my indexes after grouping in Pandas.
> I managed to rest_index and got back the index column.
> But How can I get back a index row?
>
Was the grouping an aggregation? If so, the original indexes a
On Fri, May 13, 2016, at 12:18, Aidan Silcock via Python-list wrote:
>
>
> Sent from Yahoo Mail on Android
>
> On Fri, 13 May, 2016 at 16:59, Aidan Silcock
> wrote: HelloI have tried to download python 3.5.1 today and it has
> downloaded but each time I try to open it it says I need to
On 2016-05-13 17:22, Øystein Schønning-Johansen wrote:
On Friday, May 13, 2016 at 2:04:53 AM UTC+2, Sturla Molden wrote:
You must own the GIL before you can safely use the Python C API, object
creation and refcounting in particular. Use the "Simplified GIL API" to
grab the GIL and release it whe
Ned,
At the risk of sounding like a naggy grandmother, I am not trying to argue with
you (since it is pointless arguing over the internet with a stranger whom i
don't know and I hate arguing) but It is important to note that whether there
is a need/demand for a competitor or clone is not up to
On Fri, May 13, 2016 at 1:10 AM Ben Finney
wrote:
> Howdy all,
>
> Ever since Python's much-celebrated Grand Unification of classes and
> types, I have used those terms interchangeably: every class is a type,
> and every type is a class.
>
> That may be an unwise conflation. With the recent rise
On Friday, May 13, 2016 at 2:16:37 PM UTC-4, Cai Gengyang wrote:
> Ned,
>
> At the risk of sounding like a naggy grandmother, I am not trying to argue
> with you (since it is pointless arguing over the internet with a stranger
> whom i don't know and I hate arguing) but It is important to note
Hello, Michael,Thank you. Yes, aster grouping I lost my indexing in both x, y
directions.
How to convert a row, and a column into indexes or labels?
On Friday, 13 May 2016, 17:57, Michael Selik
wrote:
On Fri, May 13, 2016 at 12:27 PM David Shi via Python-list
wrote:
I lost my ind
Hello, Michael,
Why reset_index before grouping?
Regards.
David
On Friday, 13 May 2016, 17:57, Michael Selik
wrote:
On Fri, May 13, 2016 at 12:27 PM David Shi via Python-list
wrote:
I lost my indexes after grouping in Pandas.
I managed to rest_index and got back the index column.
B
In order to preserve your index after the aggregation, you need to make
sure it is considered a data column (via reset_index) and then choose how
your aggregation will operate on that column.
On Fri, May 13, 2016 at 3:29 PM David Shi wrote:
> Hello, Michael,
>
> Why reset_index before grouping?
Just in case I misunderstood, why don't you make a little example of before
and after the grouping? This mailing list does not accept attachments, so
you'll have to make do with pasting a few rows of comma-separated or
tab-separated values.
On Fri, May 13, 2016 at 3:56 PM Michael Selik
wrote:
>
Dear MIchael,
I am very confused.
Can you send me a link to a working example?
Regards.
David
On Friday, 13 May 2016, 20:56, Michael Selik
wrote:
In order to preserve your index after the aggregation, you need to make sure
it is considered a data column (via reset_index) and then choos
Dear Michael,
I have done a number of operation in between.
Providing that information does not help you
How to reset index after grouping and various operations is of interest.
How to type in a command to find out its current dataframe?
Regards.
David
On Friday, 13 May 2016, 20:58, Michael S
On Friday, May 13, 2016 at 7:12:33 PM UTC+2, MRAB wrote:
> Every PyGILState_Ensure call must be matched with a PyGILState_Release
> call. The way it's currently written, it won't call PyGILState_Release
> if ret is NULL.
Yeah, that's tiny bug, however it is not the main problem...
> However, I
Hello, Michael,
I typed in df.index
I got the followingMultiIndex(levels=[[1.0, 4.0, 5.0, 6.0, 8.0, 9.0, 10.0,
11.0, 12.0, 13.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0,
26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0, 38.0,
39.0, 40.0, 41.0, 42.0, 44.0,
On Fri, May 13, 2016 at 2:41 AM Gregory Ewing
wrote:
> Dirk Bächle wrote:
> > I'm currently following the "Factory" pattern (more or less) as I know
> > it from C++ and similar languages.
>
> This statement sets off alarm bells for me. If you're using some
> design pattern in Python just because
Hello, Michael,
I changed groupby with one column.
The index is different.
Index([ u'AL',u'AR',u'AZ',u'CA',u'CO',u'CT',u'DC',
u'DE',u'FL',u'GA',u'IA',u'ID',u'IL',u'IN',
u'KS',u'KY',u'LA',u'MA',u'MD',u'ME',
Here's an example.
>>> import pandas as pd
>>> df = pd.DataFrame({'group': list('AB') * 2, 'data': range(4)},
index=list('wxyz'))
>>> df
data group
w 0 A
x 1 B
y 2 A
z 3 B
>>> df = df.reset_index()
>>> df
index data
Dear Michael,
To avoid complication, I only groupby using one column.
It is OK now. But, how to refer to new row index? How do I use floating index?
Float64Index([ 1.0, 4.0, 5.0, 6.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 16.0,
17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0,
To clarify that you're specifying the index as a label, use df.iloc
>>> df = pd.DataFrame({'X': range(4)}, index=list('abcd'))
>>> df
X
a 0
b 1
c 2
d 3
>>> df.loc['a']
X0
Name: a, dtype: int64
>>> df.iloc[0]
X0
Name: a, dtype: int6
Hi,
I want to use pip to install dtrx. However, I got the following error.
~~~
$ pip install --allow-external dtrx dtrx
DEPRECATION: --allow-external has been deprecated and will be removed
in the future. Due to changes in the repository protocol, it no longer
has any effect.
Collecting dtrx
Co
Hello, Michael,
How to convert a float type column into an integer or label or string type?
On Friday, 13 May 2016, 22:02, Michael Selik
wrote:
To clarify that you're specifying the index as a label, use df.iloc
>>> df = pd.DataFrame({'X': range(4)}, index=list('abcd')) >>> df
What have code you tried? What error message are you receiving?
On Fri, May 13, 2016, 5:54 PM David Shi wrote:
> Hello, Michael,
>
> How to convert a float type column into an integer or label or string type?
>
>
> On Friday, 13 May 2016, 22:02, Michael Selik
> wrote:
>
>
> To clarify that you'
On 5/13/2016 1:07 AM, Ben Finney wrote:
Howdy all,
Ever since Python's much-celebrated Grand Unification of classes and
types, I have used those terms interchangeably: every class is a type,
and every type is a class.
That may be an unwise conflation. With the recent rise of optional type
annot
Terry Reedy writes:
> I suspect that one could produce a class that is not a type, in
> Guido's meaning, with a metaclass that is not a subclass of the type
> class. I don't otherwise know what Guido might have meant.
I think meant that if X is a class, then X is (usually) also a type; but
the r
Dennis Lee Bieber writes:
> It's been tried -- but the non-GIL implementations tend to be
> slower at everything else.
Has Micropython been compared? CPython needs the GIL because of its
frequent twiddling of reference counts. Without the GIL, multi-threaded
CPython would have to acquire
On Fri, 13 May 2016 03:07 pm, Ben Finney wrote:
> Howdy all,
>
> Ever since Python's much-celebrated Grand Unification of classes and
> types, I have used those terms interchangeably: every class is a type,
> and every type is a class.
>
> That may be an unwise conflation. With the recent rise o
Hello, Michael,
I tried to discover the problem.
df[0] yields nothingdf[1] yields nothingdf[2] yields nothing
However, df[3] gives the following:sid
-9223372036854775808 NaN
1 133738.70
4 295256.11
5 137733.09
6
Hello, Michael,
I do not understand this.
I tried list =df[3]
it worked. But, it does not behave like a list.
list[0] nothinglist[1] a valuelist[2] nothing
list[4] a value
It behaves like a dictionary.
On Saturday, 14 May 2016, 4:27, David Shi wrote:
Hello, Michael,
This is very weird.
Hello, Michael,
This is very weird.
55 145340.20
56 25.43
Name: 3, dtype: float64
It looks like two columns, but it shows one single object.
Any clue?
On Saturday, 14 May 2016, 4:15, David Shi wrote:
Hello, Michael,
I tried to discover the pro
What were you hoping to get from ``df[0]``?
When you say it "yields nothing" do you mean it raised an error? What was
the error message?
Have you tried a Google search for "pandas set index"?
http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.set_index.html
On Fri, May 13, 201
47 matches
Mail list logo