python financial data cleaning

2015-06-15 Thread Sebastian M Cheung via Python-list
How to do financial data cleaning ? Say I assume a list of 1000 finance series data in myList = Open, High, Low and Close. For missing Close Price data, What is best practice to clean data in Python -- https://mail.python.org/mailman/listinfo/python-list

Re: python financial data cleaning

2015-06-15 Thread Mark Lawrence
On 15/06/2015 11:12, Sebastian M Cheung via Python-list wrote: How to do financial data cleaning ? Say I assume a list of 1000 finance series data in myList = Open, High, Low and Close. For missing Close Price data, What is best practice to clean data in Python http://pandas.pydata.org/ --

Re: python financial data cleaning

2015-06-15 Thread Sebastian M Cheung via Python-list
On Monday, June 15, 2015 at 11:13:07 AM UTC+1, Sebastian M Cheung wrote: > How to do financial data cleaning ? Say I assume a list of 1000 finance > series data in myList = Open, High, Low and Close. For missing Close Price > data, What is best practice to clean data in Python Thanks Mark just l

Re: Keypress Input

2015-06-15 Thread Oscar Benjamin
On 15 June 2015 at 06:23, John McKenzie wrote: > > Thank to the others who joined in and posted replies. > > Michael, your assumption is correct. To quote my original post, "and I > want this working on a Raspberry Pi." Doing a superficial look at curses > and getch it looks excessively complica

Re: python financial data cleaning

2015-06-15 Thread Laura Creighton
I don't know anything about this program, and in particular how complete it is, but worth a look https://github.com/benjaminmgross/clean-fin-data Laura -- https://mail.python.org/mailman/listinfo/python-list

Creating .exe file in Python

2015-06-15 Thread subhabrata . banerji
Dear Group, I am trying to learn how to create .exe file for Python. I tried to work around http://www.py2exe.org/index.cgi/Tutorial of Py2exe. The sample program went nice. But if I try to make exe for larger programs with methods and classes I am getting error. If any one of the esteemed me

Re: Creating .exe file in Python

2015-06-15 Thread Mark Lawrence
On 15/06/2015 12:42, subhabrata.bane...@gmail.com wrote: Dear Group, I am trying to learn how to create .exe file for Python. I tried to work around http://www.py2exe.org/index.cgi/Tutorial of Py2exe. The sample program went nice. But if I try to make exe for larger programs with methods and cl

Re: Creating .exe file in Python

2015-06-15 Thread Laura Creighton
In a message of Mon, 15 Jun 2015 04:42:09 -0700, subhabrata.bane...@gmail.com w rites: >Dear Group, > >I am trying to learn how to create .exe file for Python. I tried to work >around >http://www.py2exe.org/index.cgi/Tutorial of Py2exe. The sample program went >nice. >But if I try to make exe fo

Re: Get classes from "self.MyClass" to improve subclassability

2015-06-15 Thread Thomas Güttler
Hi, crazy. I develop python since several years. I was not aware, that you can change the defaults of kwargs. I am amazed, but won't use it :-) Am Samstag, 13. Juni 2015 01:09:47 UTC+2 schrieb Terry Reedy: > On 6/12/2015 7:12 AM, Thomas Güttler wrote: > > Here is a snippet from the argparse mo

Re: Creating .exe file in Python

2015-06-15 Thread subhabrata . banerji
On Monday, June 15, 2015 at 6:32:33 PM UTC+5:30, Laura Creighton wrote: > In a message of Mon, 15 Jun 2015 04:42:09 -0700, w > rites: > >Dear Group, > > > >I am trying to learn how to create .exe file for Python. I tried to work > >around > >http://www.py2exe.org/index.cgi/Tutorial of Py2exe. Th

Re: python financial data cleaning

2015-06-15 Thread Sebastian M Cheung via Python-list
On Monday, June 15, 2015 at 12:35:18 PM UTC+1, Laura Creighton wrote: > I don't know anything about this program, and in particular how > complete it is, but worth a look > https://github.com/benjaminmgross/clean-fin-data > > Laura Thanks Laura, I will check it out, but basically it is to clean f

Pandas SQL Update

2015-06-15 Thread chrismeek4542
I have an app that basically compares a old foxpro database to a MySQL database. If the time-stamp does not match up then it updates the MySQL. My question is, is there a more officiant way of doing the MySQL update. I am using pandas itterrows() then doing an update query on each iteration. The

Re: Creating .exe file in Python

2015-06-15 Thread subhabrata . banerji
On Monday, June 15, 2015 at 5:12:24 PM UTC+5:30, subhabrat...@gmail.com wrote: > Dear Group, > > I am trying to learn how to create .exe file for Python. I tried to work > around > http://www.py2exe.org/index.cgi/Tutorial of Py2exe. The sample program went > nice. > But if I try to make exe for

Re: Creating .exe file in Python

2015-06-15 Thread Thierry Chappuis
Hi, The question is why to you want to create an exe from your python project? Setuptools is capable to create small .exe launchers in the Scripts dir of your python install. These launchers start a python script and use the python interpreter registered on your platform. That's pretty light a

Re: Creating .exe file in Python

2015-06-15 Thread subhabrata . banerji
On Monday, June 15, 2015 at 8:02:21 PM UTC+5:30, Thierry Chappuis wrote: > Hi, > > The question is why to you want to create an exe from your > python project? > > Setuptools is capable to create small .exe launchers in the > Scripts dir of your python install. These launchers start a python sc

Re: Creating .exe file in Python

2015-06-15 Thread Laura Creighton
In a message of Mon, 15 Jun 2015 06:42:48 -0700, subhabrata.bane...@gmail.com w >I wrote a script as NLQ3. py > >the code is written as, > >import nltk >import itertools >def nlq3(n): >inp=raw_input("Print Your Query:") >tag=nltk.pos_tag(nltk.wordpunct_tokenize(inp)) >print "The Tag

Re: Keypress Input

2015-06-15 Thread Grant Edwards
On 2015-06-15, Oscar Benjamin wrote: > Note that going into raw mode has other implications such as not > being able to exit your program with ctrl-c or suspend with ctrl-z > etc. You can explicitly process those kinds of contrl keys with > something like: > > while True: > key = getch() >

Re: Creating .exe file in Python

2015-06-15 Thread subhabrata . banerji
On Monday, June 15, 2015 at 5:12:24 PM UTC+5:30, subhabrat...@gmail.com wrote: > Dear Group, > > I am trying to learn how to create .exe file for Python. I tried to work > around > http://www.py2exe.org/index.cgi/Tutorial of Py2exe. The sample program went > nice. > But if I try to make exe for

Re: Creating .exe file in Python

2015-06-15 Thread Laura Creighton
I don't have a windows system, so my knowledge of such things is minimal. But looks like this person had the same problem you have, and got some suggestions on how to fix it. http://stackoverflow.com/questions/12127869/error-msvcp90-dll-no-such-file-or-directory-even-though-microsoft-visual-c Bu

Re: Creating .exe file in Python

2015-06-15 Thread sohcahtoa82
On Monday, June 15, 2015 at 5:08:58 AM UTC-7, Mark Lawrence wrote: > On 15/06/2015 12:42, subhabrata.bane...@gmail.com wrote: > > Dear Group, > > > > I am trying to learn how to create .exe file for Python. I tried to work > > around > > http://www.py2exe.org/index.cgi/Tutorial of Py2exe. The samp

Re: python financial data cleaning

2015-06-15 Thread Sebastian M Cheung via Python-list
On Monday, June 15, 2015 at 11:19:48 AM UTC+1, Mark Lawrence wrote: > On 15/06/2015 11:12, Sebastian M Cheung via Python-list wrote: > > How to do financial data cleaning ? Say I assume a list of 1000 finance > > series data in myList = Open, High, Low and Close. For missing Close Price > > data,

Set a flag on the function or a global?

2015-06-15 Thread Steven D'Aprano
I have a function in a module which is intended to be used by importing that name alone, then used interactively: from module import edir edir(args) edir is an enhanced version of dir, and one of the enhancements is that you can filter out dunder methods. I have reason to believe that

Re: Set a flag on the function or a global?

2015-06-15 Thread Chris Angelico
On Tue, Jun 16, 2015 at 9:57 AM, Steven D'Aprano wrote: > I have two ideas for this, a module-level global, or a flag set on the > function object itself. Remember that the usual way of using this will be > "from module import edir", there are two obvious ways to set the global: > > import module

Re: Set a flag on the function or a global?

2015-06-15 Thread Ethan Furman
On 06/15/2015 04:57 PM, Steven D'Aprano wrote: Thoughts and feedback? Please vote: a module global, or a flag on the object? Please give reasons, and remember that the function is intended for interactive use. Function attribute. Setting a global on the module (which I may not have, and proba

Re: Set a flag on the function or a global?

2015-06-15 Thread Ben Finney
Chris Angelico writes: > On Tue, Jun 16, 2015 at 9:57 AM, Steven D'Aprano > wrote: > > I can use a flag set on the function object itself: > > > > edir.dunders = False > > For most situations, the last one is extremely surprising - attributes > on functions aren't normally meant to be changed by

Re: Set a flag on the function or a global?

2015-06-15 Thread Ethan Furman
On 06/15/2015 05:07 PM, Chris Angelico wrote: On Tue, Jun 16, 2015 at 9:57 AM, Steven D'Aprano wrote: I have two ideas for this, a module-level global, or a flag set on the function object itself. Remember that the usual way of using this will be "from module import edir", there are two obviou

Re: Set a flag on the function or a global?

2015-06-15 Thread sohcahtoa82
On Monday, June 15, 2015 at 4:57:53 PM UTC-7, Steven D'Aprano wrote: > I have a function in a module which is intended to be used by importing > that name alone, then used interactively: > > from module import edir > edir(args) > > > edir is an enhanced version of dir, and one of the en

Re: Set a flag on the function or a global?

2015-06-15 Thread Ron Adam
On 06/15/2015 08:07 PM, Chris Angelico wrote: On Tue, Jun 16, 2015 at 9:57 AM, Steven D'Aprano wrote: >I have two ideas for this, a module-level global, or a flag set on the >function object itself. Remember that the usual way of using this will be >"from module import edir", there are two o

Re: Set a flag on the function or a global?

2015-06-15 Thread Chris Angelico
On Tue, Jun 16, 2015 at 10:20 AM, Ben Finney wrote: > Chris Angelico writes: > >> On Tue, Jun 16, 2015 at 9:57 AM, Steven D'Aprano >> wrote: >> > I can use a flag set on the function object itself: >> > >> > edir.dunders = False >> >> For most situations, the last one is extremely surprising - a

Re: Set a flag on the function or a global?

2015-06-15 Thread MRAB
On 2015-06-16 01:24, sohcahto...@gmail.com wrote: On Monday, June 15, 2015 at 4:57:53 PM UTC-7, Steven D'Aprano wrote: I have a function in a module which is intended to be used by importing that name alone, then used interactively: from module import edir edir(args) edir is an enhanced versi

Re: Set a flag on the function or a global?

2015-06-15 Thread Paul Rubin
Steven D'Aprano writes: > Thoughts and feedback? Please vote: a module global, or a flag on the > object? Please give reasons, and remember that the function is intended > for interactive use. Both are bad. More state to remember, ugh. Instead have separate entry points for filtering or not f

Re: Set a flag on the function or a global?

2015-06-15 Thread Ethan Furman
On 06/15/2015 05:37 PM, Paul Rubin wrote: Steven D'Aprano writes: Thoughts and feedback? Please vote: a module global, or a flag on the object? Please give reasons, and remember that the function is intended for interactive use. Both are bad. More state to remember, ugh. Instead have separa

Re: Set a flag on the function or a global?

2015-06-15 Thread MRAB
On 2015-06-16 01:53, Ethan Furman wrote: On 06/15/2015 05:37 PM, Paul Rubin wrote: Steven D'Aprano writes: Thoughts and feedback? Please vote: a module global, or a flag on the object? Please give reasons, and remember that the function is intended for interactive use. Both are bad. More st

Re: Set a flag on the function or a global?

2015-06-15 Thread Paul Rubin
Ethan Furman writes: >>edir_(obj) = dunders. > `edir_` ? What a horrible name. I hate trailing underscores. Too easy to > miss. They've worked ok for me at various times. edir_u (for unfiltered) is another idea. -- https://mail.python.org/mailman/listinfo/python-list

Struggling with os.path.join and fileinput (was 'Path, strings, and lines'

2015-06-15 Thread Malik Rumi
On Saturday, June 13, 2015 at 1:25:52 PM UTC-5, MRAB wrote: > On 2015-06-13 05:48, Malik Rumi wrote: > > On Friday, June 12, 2015 at 3:31:36 PM UTC-5, Ian wrote: > >> On Fri, Jun 12, 2015 at 1:39 PM, Malik Rumi wrote: > >> > I am trying to find a list of strings in a directory of files. Here is >

Re: Struggling with os.path.join and fileinput (was 'Path, strings, and lines'

2015-06-15 Thread Ian Kelly
On Mon, Jun 15, 2015 at 8:00 PM, Malik Rumi wrote: > I have struggled with this for several hours and not made much progress. I > was not sure if your 'names' variable was supposed to be the same as > 'filenames'. Also, it should be 'os.path.join', not os.join. Anyway, I > thought you had some

Re: Struggling with os.path.join and fileinput (was 'Path, strings, and lines'

2015-06-15 Thread MRAB
On 2015-06-16 03:00, Malik Rumi wrote: On Saturday, June 13, 2015 at 1:25:52 PM UTC-5, MRAB wrote: On 2015-06-13 05:48, Malik Rumi wrote: > On Friday, June 12, 2015 at 3:31:36 PM UTC-5, Ian wrote: >> On Fri, Jun 12, 2015 at 1:39 PM, Malik Rumi wrote: >> > I am trying to find a list of strings i

Re: Trying to configure Apache and Python 2.7 on Red Hat I get 403 Forbidden

2015-06-15 Thread Néstor Boscán
Tried it and I keep having the same error. Isn't there a log file where I can check what is causing this? Regards, Néstor On Sat, Jun 13, 2015 at 8:47 AM, zhou weitao wrote: > selinux is causing this, I guess. Please try run *setenforce 1* to bypass > it firstly. If it works then google the re

Re: Set a flag on the function or a global?

2015-06-15 Thread Mark Lawrence
On 16/06/2015 00:57, Steven D'Aprano wrote: I have a function in a module which is intended to be used by importing that name alone, then used interactively: from module import edir edir(args) edir is an enhanced version of dir, and one of the enhancements is that you can filter out