Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

408.Advanced search and replace -- How to convert the daily data into a weekly data with program?

User: editor -- 2010-01-31          << 407  409 >>
Hits: 3014
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
How to convert the daily data into a weekly with perl program? 
 
I want to combine data rows in groups equal to weeks, all weeks except the first week must have 5 days, where the date is the first date of the week series.  
And the output file should look like a daily file where space  
is concerned  
 
OPEN is the Average of all data rows  
HIGH is the Maximum value from the data rows  
LOW is the minimum value from the data rows  
VOLUME and CLOSE are the Average value
Input Sample:
03/02/09 00:00 2.91 2.98 2.54 2845000.00 2.54  
03/03/09 00:00 2.60 2.64 2.44 3036900.00 2.46  
03/04/09 00:00 2.51 2.84 2.47 7518800.00 2.78  
03/05/09 00:00 2.71 2.71 2.50 2468700.00 2.56  
03/06/09 00:00 2.58 2.91 2.56 2962900.00 2.89  
03/09/09 00:00 2.63 3.59 2.52 3380300.00 3.03  
03/10/09 00:00 3.19 3.59 3.05 7604400.00 3.58  
03/11/09 00:00 3.48 3.60 3.41 2349100.00 3.55 
Output Sample:
03/04/09 00:00 2.67 2.98 2.44 4466900 2.59 
03/11/09 00:00 2.92 3.60 2.50 3753080 3.12 
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. ctrl-o open source text file 
2. ctrl-h open 'Replace' dialog 
* set "Replace with Pattern": 
 
* click 'Advanced' page, enter 'Run following for each matched unit': 
 
3. click 'Replace', done 
4. ctrl-s save file.
Download Script:  scripts/408.rst.zip

Screenshot 1:  Replace_Window


Screenshot 2:  Replace_Advanced_Window


Similar Examples:
How to convert the daily data into a weekly data in many text files? (81%)
How to convert the data into a table with columns? (67%)
How to convert columns of data into SQL statement for mysql database? (61%)
How to convert the decimal IP address into binary format with 0 and 1? (56%)
How to convert csv files into tables with html format? (53%)
How to convert the date in a text file into GMT(Greenwich Mean Time)? (52%)
How to count how many characters in a web page? (52%)
How to convert database file into "|" delimitered file? (51%)

Check Demo of Advanced search and replace
Keywords:
weekly  week  minimum  series  asp  combine  groups  equal  average  rage  convert daily data weekly  convert daily data to weekly data  replace with a series  combine file  first space  perl replace text  except search text  convert date text