Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Jan 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    python: obtain data from .csv file

    How can I get data from file outside of the python program?
    How can I read the data files and split each line of the data file it?
    thanks

  • #2
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by hm25 View Post
    How can I get data from file outside of the python program?
    How can I read the data files and split each line of the data file it?
    thanks
    http://docs.python.org/release/2.6.6/library/csv.html

    best regards

  • #3
    New to the CF scene
    Join Date
    Jan 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by oesxyl View Post
    it is really hard to understand it.


    is there any easy way to do it

    thanks

  • #4
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by hm25 View Post
    it is really hard to understand it.


    is there any easy way to do it

    thanks
    what is so hard?

    best regards

  • #5
    New to the CF scene
    Join Date
    Jan 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by oesxyl View Post
    what is so hard?

    best regards
    this is first time to use programming SO.
    I have the coding in python but I need to call it from .CSV file to do the function ?

  • #6
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by hm25 View Post
    this is first time to use programming SO.
    I have the coding in python but I need to call it from .CSV file to do the function ?
    i'm sorry but i don't understand what do you ask.

    learn basic things first and take it step by step, you can't jump to this if you don't understand the rest and is no magic way, only work.

    check to see what version of python do you run first then go to the tutorial for your version( there are differences between version).

    http://www.python.org/doc/versions/

    write and run the examples, write your own code based on what you learn, post specific question here when you have problems.

    best regards


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •