1 | initial version |

Python modules such as matplotlib, numpy, pandas, etc, don't know about Sage integers. So you have to feed them Python ints.

However, Sage's preparser automatically turns every integer in your input into a Sage integer.

One way to counter that is to append the letter `r`

(for 'raw'), as in:

```
print data_inf[:3r]
```

Another way to not have preparsing on is to turn the preparser off:

```
preparser(False)
```

Another way is to write your code in a `.py`

file and to load that file.
That is, write this in a file, say `mycode.py`

:

```
import pandas as pd
fname = 'blah.xlsx'
data_inf = pd.read_excel(fname)
print data_inf[:3]
```

and then run the following:

```
sage: load('mycode.py')
```

2 | No.2 Revision |

Python modules such as matplotlib, numpy, pandas, etc, don't know about Sage integers. So you have to feed them Python ints.

However, Sage's preparser automatically turns every integer in your input into a Sage integer.

One way to counter that is to append the letter `r`

(for 'raw'), as in:

```
print data_inf[:3r]
```

See the effect on ints and floats:

```
sage: type(1)
<type 'sage.rings.integer.Integer'>
sage: type(1r)
<type 'int'>
sage: type(1.5)
<type 'sage.rings.real_mpfr.RealLiteral'>
sage: type(1.5r)
<type 'float'>
```

Another way to not have preparsing on is to turn the preparser off:

```
preparser(False)
```

Another way is to write your code in a `.py`

file and to load that file.
That is, write this in a file, say `mycode.py`

:

```
import pandas as pd
fname = 'blah.xlsx'
data_inf = pd.read_excel(fname)
print data_inf[:3]
```

and then run the following:

```
sage: load('mycode.py')
```

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.