Tagged Questions
1
vote
1answer
54 views
Pandas df.head() Error
I'm having a basic problem with df.head(). When the function is executed, it usually displays a nice HTML formatted table of the top 5 values, but now it only appears to slice the dataframe and ...
0
votes
1answer
117 views
Make more than one chart in same IPython Notebook cell
I have started my IPython Notebook with
ipython notebook --pylab inline
This is my code in one cell
df['korisnika'].plot()
df['osiguranika'].plot()
This is working fine, it will draw two lines, ...
3
votes
1answer
133 views
IPython Notebook: What is the default encoding?
I have created a package using the encoding utf-8.
When calling a function, it returns a DataFrame, with a column coded in utf-8.
When using IPython at the command line, I don't have any problems ...
8
votes
1answer
276 views
qtconsole not rendering pandas dataframes as html notebook_repr_html option
I recently upgraded my version of pandas. I have the latest stable version installed now:
pd.__version__
Out[5]: '0.10.1'
prior to this upgrade, this is how dataframes were displayed in the ...
4
votes
2answers
177 views
How to preview a part of a large pandas DataFrame?
I am just getting started with pandas in the IPython Notebook and encountering the following problem: When a DataFrame read from a CSV file is small, the IPython Notebook displays it in a nice table ...
7
votes
3answers
837 views
How to use pandas dataframes and numpy arrays in Rpy2?
I'd like to use pandas for all my analysis along with numpy but use Rpy2 for plotting my data. I want to do all analyses using pandas dataframes and then use full plotting of R via rpy2 to plot these. ...
0
votes
1answer
340 views
Matplotlib in IPython + Pandas: ImportError Symbol not found: _png_create_info_struct
I've built Matplotlib in Python such that when I import it or any part of it, it works fine and graphs fine.
However, I've been going through "Python for Data Analysis," and in Ch.2's IPython ...
0
votes
1answer
80 views
Suppress output of object when plotting in ipython
Is it possible to suppress the array output when plotting a histogram in ipython?:
For example:
plt.hist(OIR['Range'], bins, named=True, histtype='bar')
outputs/prints the array information before ...
2
votes
1answer
158 views
RMagic, IPython and Summary Information
Following the example here
http://www.randalolson.com/2013/01/14/filling-in-pythons-gaps-in-statistics-packages-with-rmagic/
I tried the same on a different data set found here, in an IPython ...
1
vote
2answers
139 views
Ipython Notebook not printing type() in dataframe
This is a pretty bizarre bug:
The following code:
a = 'string1'
b = 'string2'
test_dict = {'col1':{a:type(a), b:type(b)},'col2':{a:type(a), b:type(b)}}
pd.DataFrame(test_dict)
In a normal ipython ...
4
votes
1answer
153 views
Plot pandas dataframe containing NaNs
I have GPS data of ice speed from three different GPS receivers. The data are in a pandas dataframe with an index of julian day (incremental from the start of 2009).
This is a subset of the data (the ...
1
vote
1answer
662 views
Is it possible to save session in ipython like in MATLAB?
Would be useful save the session variables which could be loaded easily into memory at a later stage.
2
votes
1answer
485 views
MultiLevel index to columns : getting value_counts as columns in pandas
In a very general sense, the problem I am looking to solve is changing one component of a multi-level index into columns. That is, I have a Series that contains a multilevel index and I want the ...
8
votes
3answers
3k views
Selecting rows from a Pandas dataframe with a compound (hierarchical) index
I'm suspicious that this is trivial, but I yet to discover the incantation that will let me select rows from a Pandas dataframe based on the values of a hierarchical key. So, for example, imagine we ...
6
votes
2answers
244 views
Joining a Pandas series with a hierarchical index back to the source DataFrame
I'm trying to wrap my brain around Pandas data structures and trying to use them in anger a bit. I've figured out that groupby operations result in a pandas series object. But I can't quite figure out ...