Communities for your favorite technologies. Explore all Collectives
Ask questions, find answers and collaborate at work with Stack Overflow for Teams.
Ask questions, find answers and collaborate at work with Stack Overflow for Teams. Explore Teams
Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Hello I read a gzip file into dataframe and when I was create columns name I take this:
However when I read the table the result is:
My quesstion is: I want to create 7 different columns but I can't. Each comma is a column . How can I do that?
sep=r' |,'
Maybe you can try this:
import pandas as pd df = pd.read_table('part-00000.gz', compression='gzip', sep=',', name=['search_id',...,'return'], header=None)
You can pass column names when you read gzip files. Hope this will help.
Add a comment
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.
sep=r' |,'