0

I have a data file, say "sample.data.gz", I have compressed it using gunzip to get sample.data file, but I'm unable to load it into pandas? I don't know how to load the data using .read_csv or .read_table.

aspiring1
  • 344
  • 1
  • 13
  • 32
  • What have you tried so far? – G. Anderson May 03 '19 at 15:16
  • @G.Anderson was trying to load it into pandas dataframe, using read_csv or read_table, I tried searching stackoverflow, but couldn't get anything. – aspiring1 May 03 '19 at 15:18
  • I apologize, I wasn't clear. Please show some code for what you've tried, and what the result was, so we know specifically how to help. See this link on creating a [mcve] – G. Anderson May 03 '19 at 15:24
  • @G.Anderson: I didn't get any result, my laptop just hanged, I had tried `df = pd.read_csv('sample.data')` – aspiring1 May 03 '19 at 17:29

1 Answers1

2

Here is a notebook labeld 'Quick .gz Pandas tutorial'. I think it might help.

On the other hand, if you have .tar.gz, see this post.

Hope this helps!

89f3a1c
  • 1,430
  • 1
  • 14
  • 24