Hardik
Hardik

Reputation: 25

Reading .ASC format file in python

I am dealing with a certain .asc file format which contains some data regarding weight and height. I just want to find BMI indexes of people with this data. I am not able to make sense of the dataframe formed after reading the data.

import pandas as pd
 df = pd.read_table("data.asc")

I am not able to make sense of the result that I get. Please help me out

Upvotes: 1

Views: 8774

Answers (1)

rodrigo franco
rodrigo franco

Reputation: 320

I recently had to work with a file with the extension "asc". My solution was the following:

  1. I opened the file with a text editor and check the separator for the file, then transform it into a spreadsheet. In my case, I turned the document into a "csv" file.

  2. After that I ran:

    import pandas as pd
    df = pd.read_csv('path to your file')
    

Upvotes: 1

Related Questions