Top "Dataframe" questions

A data frame is a 2D tabular data structure.

Rename Pandas DataFrame Index

I've a csv file without header, with a DateTime index. I want to rename the index and column name, but …

python pandas dataframe
How to get the first column of a pandas DataFrame as a Series?

I tried: x=pandas.DataFrame(...) s = x.take([0], axis=1) And s gets a DataFrame, not a Series.

python dataframe pandas series
Get column index from column name in python pandas

In R when you need to retrieve a column index based on the name of the column you could do …

python pandas dataframe indexing
Appending a list or series to a pandas DataFrame as a row?

So I have initialized an empty pandas DataFrame and I would like to iteratively append lists (or Series) as rows …

python pandas append dataframe
Converting a column within pandas dataframe from int to string

I have a dataframe in pandas with mixed int and str data columns. I want to concatenate first the columns …

python string pandas dataframe int
Pandas create empty DataFrame with only column names

I have a dynamic DataFrame which works fine, but when there are no data to be added into the DataFrame …

python pandas dataframe
How to filter rows containing a string pattern from a Pandas dataframe

Assume we have a data frame in Python Pandas that looks like this: df = pd.DataFrame({'vals': [1, 2, 3, 4], 'ids': [u'aball', u'bball', …

python pandas dataframe
Difference between map, applymap and apply methods in Pandas

Can you tell me when to use these vectorization methods with basic examples? I see that map is a Series …

python pandas dataframe vectorization
Compare two data.frames to find the rows in data.frame 1 that are not present in data.frame 2

I have the following 2 data.frames: a1 <- data.frame(a = 1:5, b=letters[1:5]) a2 <- data.frame(a = 1:3, …

r merge compare rows dataframe
Combine two data frames by rows (rbind) when they have different sets of columns

Is it possible to row bind two data frames that don't have the same set of columns? I am hoping …

r dataframe r-faq