Re: double bracket integer index in pandas; Is this a legal syntax

2023-05-03 Thread Artie Ziff
I agree with your analysis, Cameron. The code came from a video course, "Pandas Data Analysis with Python Fundamentals" by Daniel Chen. I am curious why the author may have said this. To avoid attaching screenshots, I'll describe this section of the content. Perhaps someone can say, "oh that's ho

double bracket integer index in pandas; Is this a legal syntax

2023-05-03 Thread Artie Ziff
Hello, I am hope that pandas questions are OK here. In a panda lecture, I did not get the expected result. I tried this on two different platforms (old macOS distro and up-to-date Ubuntu Linux distro, 22.04) The Linux distro has: python3.10.11 pandas1.5.2

Re: how to handle response data that is streaming and chunked?

2019-03-22 Thread Artie Ziff
> > > What do you mean by "response library"? > So sorry for the vocabulary mislead. I intended to write "requests" referring to the http networking lib with the bazillion downloads. ;-) -- https://mail.python.org/mailman/listinfo/python-list

Re: how to handle response data that is streaming and chunked?

2019-03-21 Thread Artie Ziff
Some more info I wanted to add this relevant stack overflow post: https://stackoverflow.com/questions/17822342/understanding-python-http-streaming The code splitting on text produces the following sample output: {"status":"connected"}{"quote":{"ask":"195.95","asksz":"1000","bid":"195.93","bi

how to handle response data that is streaming and chunked?

2019-03-21 Thread Artie Ziff
Hello, I am trying to learn how to do use response library in the least confusing way possible. My data source is streaming. The sample I share below looks more complicated that it needs to be. I do not have enough experience with this to know better. Hence why I came here for guidance and direct

Re: xml data or other?

2012-11-18 Thread Artie Ziff
On 11/9/12 5:50 AM, rusi wrote: On Nov 9, 5:54 pm, Artie Ziff wrote: # submit correctedinput to etree I was very grateful to get the "leg up" on getting started down that right path with my coding. Many thanks to you, rusi. I took your excellent advices and have this workin

xml data or other?

2012-11-09 Thread Artie Ziff
Hello, I want to process XML-like data like this: ACPI (Advanced Control Power & Integration) testscript for 2.5 kernels. <\description> ltp/testcases/kernel/device-drivers/acpi/ltpacpi.sh <\test_location> <\testname> After m

string to unicode

2011-08-15 Thread Artie Ziff
if I am using the standard csv library to read contents of a csv file which contains Unicode strings (short example: '\xe8\x9f\x92\xe8\x9b\x87'), how do I use a python Unicode method such as decode or encode to transform this string type into a python unicode type? Must I know the encoding (byt

glutInit and wxPython on Mac OSX

2007-02-05 Thread Artie
then all is well. Has anyone ran across this issue before? If so, why does this order matter or affect the wx Event system? --artie -- http://mail.python.org/mailman/listinfo/python-list

Re: libpython2.3.a Linux

2005-05-22 Thread Artie Gold
ing on windows 2k is fine. > > Thanks for any input. > > David > > > HTH, --ag -- Artie Gold -- Austin, Texas http://it-matters.blogspot.com (new post 12/5) http://www.cafepress.com/goldsays -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with unpack hex to decimal

2005-04-17 Thread Artie Gold
(due to alignment. 'bh', a signed char followed by a short would look like: bXhh -- or four bytes, but 'hb', a short followed by a signed char would be: hhb (as `char' and its siblings have no alignment requirements) HTH, --ag -- Artie Gold -- Austin, Texas http://it-matters.blogspot.com (new post 12/5) http://www.cafepress.com/goldsays -- http://mail.python.org/mailman/listinfo/python-list

Re: Lambda: the Ultimate Design Flaw

2005-04-02 Thread Artie Gold
LAMBDA. But, despite of the PR value of anything with Guy Steele's name associated with it, we think these features should be cut from PLT Scheme v300. [...] The whole text seems to be a variant of <http://www.artima.com/weblogs/viewpost.jsp?thread=98196>. TschÃ, Torsten. Ya think? ;-) -

Re: Simple thread-safe counter?

2005-04-02 Thread Artie Gold
Leif K-Brooks wrote: Artie Gold wrote: Skip Montanaro wrote: counter = Queue.Queue() def f(): i = counter.get() I think you need: i = counter.get(True) The default value for the "block" argument to Queue.get is True. Right. I misparsed the entry in the doc

Re: Simple thread-safe counter?

2005-04-01 Thread Artie Gold
counter.put(i+1) return i [snip] This is, of course dependent upon counter.get() being guaranteed to be thread safe. (I haven't found anything in the docs specifically relating to that. Perhaps it's implicit?) Thanks, --ag -- Artie Gold -- Austin, Texas http://it-matte

Re: Bug?

2005-03-13 Thread Artie Gold
on for this? Yup. ;-) Numbers beginning with a `0' are in octal (base 8), so only the digits `0' through `7' are valid. HTH, --ag -- Artie Gold -- Austin, Texas http://it-matters.blogspot.com (new post 12/5) http://www.cafepress.com/goldsays -- http://mail.python.org/mailman/listinfo/python-list

Re: Turning String into Numerical Equation

2005-03-12 Thread Artie Gold
27;:math.pow,'log':math.log},{'x':1,'y':2}) [No, you wouldn't want to write it that way; it's merely illustrating what you can do without doing much.] HTH, --ag [BTW -- cultural question: Do we top-post here?] "Artie Gold" <[EMAIL PROTECTE

Re: Turning String into Numerical Equation

2005-03-12 Thread Artie Gold
ll of the different mathematical rules. Does anyone have a better idea than parsing to compute an equation from a string representation? Thanks so much! Brian Kazian eval() See: http://docs.python.org/lib/built-in-funcs.html#l2h-23 HTH, --ag -- Artie Gold -- Austin, Texas http