Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #92696

Re: python financial data cleaning

From Mark Lawrence <breamoreboy@yahoo.co.uk>
Subject Re: python financial data cleaning
Date 2015-06-16 20:40 +0100
References <b0cbc75c-cc0b-4f27-a8d6-e4c20c356e6d@googlegroups.com> <mailman.480.1434363576.13271.python-list@python.org> <55a0ccda-572c-4324-9169-08028d4fb619@googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.525.1434483634.13271.python-list@python.org> (permalink)

Show all headers | View raw


On 15/06/2015 22:01, Sebastian M Cheung via Python-list wrote:
> 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, What is best practice to clean data in Python
>>>
>>
>> http://pandas.pydata.org/
>>
>> --
>> My fellow Pythonistas, ask not what our language can do for you, ask
>> what you can do for our language.
>>
>> Mark Lawrence
>
>
> Hi Mark,
>
> Below I read in DirtyData (financial data) from Excel and then find the number of NaN missing Closed Pricing data:
>
> xls = pd.ExcelFile('DirtyData.xlsm')
> df = xls.parse('Dirty Data', index_col=None, na_values=['NA'])
> print(df.isnull().astype(int).sum())
>
> So if I were to clean missing Open Price data, I could copy from previous or row's Close Price data, but how would I implement it? Thanks
>

I'm sorry but my knowledge of pandas is limited, I just know it's pretty 
much best of breed.  Try stackoverflow or 
https://groups.google.com/forum/#!forum/pydata which is gated to 
gmane.comp.python.pydata

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

python financial data cleaning Sebastian M Cheung <minscheung@googlemail.com> - 2015-06-15 03:12 -0700
  Re: python financial data cleaning Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-06-15 11:19 +0100
    Re: python financial data cleaning Sebastian M Cheung <minscheung@googlemail.com> - 2015-06-15 14:01 -0700
      Re: python financial data cleaning Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-06-16 20:40 +0100
  Re: python financial data cleaning Sebastian M Cheung <minscheung@googlemail.com> - 2015-06-15 03:59 -0700
  Re: python financial data cleaning Laura Creighton <lac@openend.se> - 2015-06-15 13:34 +0200
    Re: python financial data cleaning Sebastian M Cheung <minscheung@googlemail.com> - 2015-06-15 06:42 -0700

csiph-web