Top "Dataframe" questions

A data frame is a 2D tabular data structure.

Drop data frame columns by name

I have a number of columns that I would like to remove from a data frame. I know that we …

r dataframe r-faq
Add one row to pandas DataFrame

I understand that pandas is designed to load fully populated DataFrame but I need to create an empty DataFrame then …

python pandas dataframe append
Changing column names of a data frame

I have a data frame called "newprice" (see below) and I want to change the column names in my program …

r dataframe rename
Writing a pandas DataFrame to CSV file

I have a dataframe in pandas which I would like to write to a CSV file. I am doing this …

python csv pandas dataframe
How do I replace NA values with zeros in an R dataframe?

I have a data frame and some columns have NA values. How do I replace these NA values with zeroes?

r dataframe na missing-data imputation
Creating an empty Pandas DataFrame, then filling it?

I'm starting from the pandas DataFrame docs here: http://pandas.pydata.org/pandas-docs/stable/dsintro.html I'd like to iteratively …

python dataframe pandas
How to join (merge) data frames (inner, outer, left, right)

Given two data frames: df1 = data.frame(CustomerId = c(1:6), Product = c(rep("Toaster", 3), rep("Radio", 3))) df2 = data.frame(CustomerId = c(2, 4, 6), …

r join merge dataframe r-faq
How to sort a dataframe by multiple column(s)

I want to sort a data.frame by multiple columns. For example, with the data.frame below I would like …

r sorting dataframe r-faq
Extracting specific columns from a data frame

I have an R data frame with 6 columns, and I want to create a new dataframe that only has three …

r dataframe r-faq
How to get a value from a cell of a dataframe?

I have constructed a condition that extract exactly one row from my data frame: d2 = df[(df['l_ext']==l_…

python pandas dataframe