Solved

storing csv file in table variable in Python

Posted on 2017-03-12
2
91 Views
Last Modified: 2017-03-13
Hi All,

As we know that in R language you can store a  data file into a data.table and can do all kinds of data manipulations to the table variable. data.table has got a lot of built in methods that could be used to do data manipulations on that table object....

Can i do similar - like read and store a csv file into a data.table (how to do it in python)? so that i can do all kinds of manupulation to it,? can you show me some sample python code example.
Does python can got something similar...like a table object that I can use? or anything close?

Thank you
0
Comment
Question by:Rayne
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 29

Accepted Solution

by:
pepr earned 500 total points
ID: 42045193
There is no standard module/functionality similar to R data.table in Python. I do not have a first hand experience, but you may want to use the pandas library, its pandas.DataFrame, and the functions pandas.read_csv and the pandas.DataFrame.to_csv.
0
 

Author Comment

by:Rayne
ID: 42046848
Thank you Pepr, Pandas the way to go, confirmed :)
0

Featured Post

Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

736 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question