Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

python pandas code help

  • 30-12-2014 1:14am
    #1
    Closed Accounts Posts: 1,040 ✭✭✭


    Hi, i want to select a column and certain rows from a csv file using panda module in python.

    for example i want to select column 'temperature' and rows 20 to 60.

    can you help with the code please?

    import pandas as pd
    temp = pd.read_csv("dates.csv")
    saved_column=temp.temperature ...???


Comments

  • Hosted Moderators Posts: 3,331 ✭✭✭Splinter


    I'm not familiar with pandas myself. I'd only ever use the csv module but I understand pandas might be better for larger data. This may be able to help you. It looks like you can specify the line headers that you want and it'll parse the rest


Advertisement