Coder Social home page Coder Social logo

Comments (8)

giuse88 avatar giuse88 commented on July 17, 2024 1

@crazy25000 Fixed in 0.1.6

from duka.

giuse88 avatar giuse88 commented on July 17, 2024

Hi @crazy25000

Yeah, I could add a command line option allowing to specify how to aggregate the data. For example:

 --daily 
 --monthly
 --weekly

from duka.

crazy25000 avatar crazy25000 commented on July 17, 2024

@giuse88 that would be perfect! I also noticed the timestamps are not correct, they only show minutes/seconds/ticks, but no hours.

from duka.

giuse88 avatar giuse88 commented on July 17, 2024

@crazy25000 It was a bug. It is now fixed if you update to 0.1.2.

from duka.

crazy25000 avatar crazy25000 commented on July 17, 2024

@giuse88 awesome, thank you!

from duka.

crazy25000 avatar crazy25000 commented on July 17, 2024

Here is what I'm using to combine files. Memory usage gets really high when manipulating large amount of rows so I don't manipulate data and combine until after all individual files get downloaded.

Step 1 is not posted because it's just for me to 'clean' the files.

import glob
import os

mypath = '/home/user/'
allCSVfiles = glob.glob(mypath + "*.csv")
combinedCSV = mypath + 'output.csv'
header_saved = False
totalFiles = len(allCSVfiles)
count = 1

print '..::| Step 2: Combine files |::..'
with open(combinedCSV,'wb') as fout:
    count = 1
    for filename in sorted(allCSVfiles):
        print '        ', str(count) + '/' + str(totalFiles)
        with open(filename) as fin:
            header = next(fin)
            if not header_saved:
                fout.write(header)
                header_saved = True
            for line in fin:
                fout.write(line)
        count+=1

print '..::| Step 3: Delete old files |::..'
for filename in sorted(allCSVfiles):
    if combinedCSV not in filename:
        os.remove(filename)

from duka.

giuse88 avatar giuse88 commented on July 17, 2024

I see. Thank you for sharing your code... I am actually fixing this problem in the develop branch. The new release will dump the file onto one single file. In addition to that, I am also adding support for candles with different time frame. I hope to get it done this weekend.

This is the PR for the new release #7 @crazy25000

from duka.

crazy25000 avatar crazy25000 commented on July 17, 2024

Awesome, thank you @giuse88!

from duka.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.