Why do I get No module named 'sympy.series.approximants' error when importing Sympy with anaconda? - jupyter-notebook

Sympy is downloaded with anaconda. In a Jupyter notebook, I have 'from sympy import divisors' and I get this:
ModuleNotFoundError Traceback (most recent call last)
Cell In[12], line 1
----> 1 from sympy import divisors
File ~/Desktop/anaconda3/lib/python3.9/site-packages/sympy/__init__.py:107
70 from .assumptions import (AppliedPredicate, Predicate, AssumptionsContext,
71 assuming, Q, ask, register_handler, remove_handler, refine)
73 from .polys import (Poly, PurePoly, poly_from_expr, parallel_poly_from_expr,
74 degree, total_degree, degree_list, LC, LM, LT, pdiv, prem, pquo,
75 pexquo, div, rem, quo, exquo, half_gcdex, gcdex, invert,
(...)
104 laguerre_poly, apart, apart_list, assemble_partfrac_list, Options,
105 ring, xring, vring, sring, field, xfield, vfield, sfield)
--> 107 from .series import (Order, O, limit, Limit, gruntz, series, approximants,
108 residue, EmptySequence, SeqPer, SeqFormula, sequence, SeqAdd, SeqMul,
109 fourier_series, fps, difference_delta, limit_seq)
111 from .functions import (factorial, factorial2, rf, ff, binomial,
112 RisingFactorial, FallingFactorial, subfactorial, carmichael,
113 fibonacci, lucas, motzkin, tribonacci, harmonic, bernoulli, bell, euler,
(...)
132 Znm, elliptic_k, elliptic_f, elliptic_e, elliptic_pi, beta, mathieus,
133 mathieuc, mathieusprime, mathieucprime, riemann_xi, betainc, betainc_regularized)
135 from .ntheory import (nextprime, prevprime, prime, primepi, primerange,
136 randprime, Sieve, sieve, primorial, cycle_length, composite,
137 compositepi, isprime, divisors, proper_divisors, factorint,
(...)
148 continued_fraction_iterator, continued_fraction_reduce,
149 continued_fraction_convergents, continued_fraction, egyptian_fraction)
File ~/Desktop/anaconda3/lib/python3.9/site-packages/sympy/series/__init__.py:7
5 from .gruntz import gruntz
6 from .series import series
----> 7 from .approximants import approximants
8 from .residues import residue
9 from .sequences import SeqPer, SeqFormula, sequence, SeqAdd, SeqMul
ModuleNotFoundError: No module named 'sympy.series.approximants'
Any ideas on what I am doing wrong? Thank you.
Tried using the terminal to update, but I am garbage with anything beyond the basics.

Related

Metpy Static Stability - MemoryError: Unable to allocate 13.4 GiB for an array with shape (19, 1825, 180, 288) and data type float64

I have downloaded GFDL-ESM model global data for temperature for 2010-2014 period of around 3.5 GB. I want to calcuate static stability using the METPY library.
My dataset looks like this Temperature Data
The code I am using is as follows:
import xarray as xr
import numpy as np
import pandas as pd
import geopandas as gp
import matplotlib.pyplot as plt
import cartopy
import cartopy.crs as ccrs
from cartopy import feature as cf
import netCDF4 as nc
import seaborn as sns
import glob
from datetime import datetime, timedelta
import cartopy.feature as cfeature
import matplotlib.gridspec as gridspec
import metpy.calc as mpcalc
from metpy.units import units
from metpy.plots.declarative import *
from netCDF4 import num2date
import scipy.ndimage as ndimage
from scipy.ndimage import gaussian_filter
from siphon.ncss import NCSS
from metpy.cbook import get_test_data
from metpy.interpolate import cross_section
import math
all=glob.glob(" {path} /ta_Eday_GFDL-ESM4_historical_r1i1p1f1_gr1_20100101-20141231.nc")
all
ds= xr.open_mfdataset(all).metpy.parse_cf()
ds
t=ds['ta']
pt = mpcalc.static_stability( t.plev*units.millibar , t*units.K )
After running this program the error I am getting is as follows:
--------
MemoryError Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_14188\3773388047.py in <cell line: 1>()
----> 1 pt = mpcalc.static_stability( t.plev*units.millibar , t*units.K )
~\miniconda3\lib\site-packages\metpy\xarray.py in wrapper(*args, **kwargs)
1542 )
1543
-> 1544 return func(*bound_args.args, **bound_args.kwargs)
1545 return wrapper
~\miniconda3\lib\site-packages\metpy\xarray.py in wrapper(*args, **kwargs)
1233
1234 # Evaluate inner calculation
-> 1235 result = func(*bound_args.args, **bound_args.kwargs)
1236
1237 # Wrap output based on match and match_unit
~\miniconda3\lib\site-packages\metpy\units.py in wrapper(*args, **kwargs)
294 def wrapper(*args, **kwargs):
295 _check_units_inner_helper(func, sig, defaults, dims, *args, **kwargs)
--> 296 return func(*args, **kwargs)
297
298 return wrapper
~\miniconda3\lib\site-packages\metpy\calc\thermo.py in static_stability(pressure, temperature, vertical_dim)
3125
3126 """
-> 3127 theta = potential_temperature(pressure, temperature)
3128
3129 return - mpconsts.Rd * temperature / pressure * first_derivative(
~\miniconda3\lib\site-packages\metpy\xarray.py in wrapper(*args, **kwargs)
1233
1234 # Evaluate inner calculation
-> 1235 result = func(*bound_args.args, **bound_args.kwargs)
1236
1237 # Wrap output based on match and match_unit
~\miniconda3\lib\site-packages\metpy\units.py in wrapper(*args, **kwargs)
294 def wrapper(*args, **kwargs):
295 _check_units_inner_helper(func, sig, defaults, dims, *args, **kwargs)
--> 296 return func(*args, **kwargs)
297
298 return wrapper
~\miniconda3\lib\site-packages\metpy\calc\thermo.py in potential_temperature(pressure, temperature)
137
138 """
--> 139 return temperature / exner_function(pressure)
140
141
~\miniconda3\lib\site-packages\metpy\xarray.py in wrapper(*args, **kwargs)
1233
1234 # Evaluate inner calculation
-> 1235 result = func(*bound_args.args, **bound_args.kwargs)
1236
1237 # Wrap output based on match and match_unit
~\miniconda3\lib\site-packages\metpy\units.py in wrapper(*args, **kwargs)
294 def wrapper(*args, **kwargs):
295 _check_units_inner_helper(func, sig, defaults, dims, *args, **kwargs)
--> 296 return func(*args, **kwargs)
297
298 return wrapper
~\miniconda3\lib\site-packages\metpy\calc\thermo.py in exner_function(pressure, reference_pressure)
95
96 """
---> 97 return (pressure / reference_pressure).to('dimensionless')**mpconsts.kappa
98
99
~\miniconda3\lib\site-packages\pint\quantity.py in __truediv__(self, other)
1339
1340 def __truediv__(self, other):
-> 1341 return self._mul_div(other, operator.truediv)
1342
1343 def __rtruediv__(self, other):
~\miniconda3\lib\site-packages\pint\quantity.py in wrapped(self, *args, **kwargs)
137 elif isinstance(other, list) and other and isinstance(other[0], type(self)):
138 return NotImplemented
--> 139 return f(self, *args, **kwargs)
140
141 return wrapped
~\miniconda3\lib\site-packages\pint\quantity.py in wrapped(self, *args, **kwargs)
117 def ireduce_dimensions(f):
118 def wrapped(self, *args, **kwargs):
--> 119 result = f(self, *args, **kwargs)
120 try:
121 if result._REGISTRY.auto_reduce_dimensions:
~\miniconda3\lib\site-packages\pint\quantity.py in _mul_div(self, other, magnitude_op, units_op)
1311 other = other.to_root_units()
1312
-> 1313 magnitude = magnitude_op(new_self._magnitude, other._magnitude)
1314 units = units_op(new_self._units, other._units)
1315
MemoryError: Unable to allocate 13.4 GiB for an array with shape (19, 1825, 180, 288) and data type float64
Please help.
​
As indicated by the MemoryError, the problem is that the calculation you're requesting needs to allocate a large 13GB array, which isn't fitting in the memory on your system.
When you use open_mfdataset, xarray lazily loads the data, meaning it doesn't actually read all of the values into memory until they are requested.
Unfortunately, MetPy's calculations operate eagerly, meaning when you call static_stability on this full dataset, it's going to iterate over all of these values and needs to store the full final result into memory.
The Dask library tries to address this by allowing for "chunking" arrays that are bigger than can fit in memory and smartly handling computations. Unfortunately, while xarray can use Dask internally, MetPy's support for Dask right now is not particularly robust; I'm not sure how well 1static_stability` would work when given a large Dask array.
If Dask doesn't work here with MetPy, one work-around is to only calculate on a subset of the data (e.g. whatever size you'd be doing analysis on, like a single time or a single vertical level) and iterate over these subsets.

Not able to use NERModel due to import issue from SimpleTransformers

I'm trying to use SimpleTransformers module for this competition.
After successfully installing the package SimpleTransformers in kernel , i'm trying to import NERModel and NERArgs packages from simpletransformers.ner. But i get error message as below.
**
!pip install SimpleTransformers
#(The above statement works fine.)
from simpletransformers.ner import NERModel,NERArgs
#(While executing the above statement , getting below error)
ImportError Traceback (most recent call last)
in
1 get_ipython().system('pip install --upgrade fsspec')
----> 2 from simpletransformers.ner import NERModel,NERArgs
/opt/conda/lib/python3.7/site-packages/simpletransformers/ner/init.py in
1 from simpletransformers.config.model_args import NERArgs
----> 2 from simpletransformers.ner.ner_model import NERModel
/opt/conda/lib/python3.7/site-packages/simpletransformers/ner/ner_model.py in
30 )
31 from transformers.optimization import AdamW, Adafactor
---> 32 from transformers import (
33 AlbertConfig,
34 AlbertForTokenClassification,
/opt/conda/lib/python3.7/site-packages/transformers/init.py in getattr(self, name)
2485 if name == "version":
2486 return version
-> 2487 return super().getattr(name)
2488
2489 sys.modules[name] = _LazyModule(name, _import_structure)
/opt/conda/lib/python3.7/site-packages/transformers/file_utils.py in getattr(self, name)
1698 elif name in self._class_to_module.keys():
1699 module = self._get_module(self._class_to_module[name])
-> 1700 value = getattr(module, name)
1701 else:
1702 raise AttributeError(f"module {self.name} has no attribute {name}")
/opt/conda/lib/python3.7/site-packages/transformers/file_utils.py in getattr(self, name)
1697 value = self._get_module(name)
1698 elif name in self._class_to_module.keys():
-> 1699 module = self._get_module(self._class_to_module[name])
1700 value = getattr(module, name)
1701 else:
/opt/conda/lib/python3.7/site-packages/transformers/models/auto/init.py in _get_module(self, module_name)
196
197 def _get_module(self, module_name: str):
--> 198 return importlib.import_module("." + module_name, self.name)
199
200 sys.modules[name] = _LazyModule(name, _import_structure)
/opt/conda/lib/python3.7/importlib/init.py in import_module(name, package)
125 break
126 level += 1
--> 127 return _bootstrap._gcd_import(name[level:], package, level)
128
129
/opt/conda/lib/python3.7/site-packages/transformers/models/auto/modeling_auto.py in
197 from ..pegasus.modeling_pegasus import PegasusForCausalLM, PegasusForConditionalGeneration, PegasusModel
198 from ..prophetnet.modeling_prophetnet import ProphetNetForCausalLM, ProphetNetForConditionalGeneration, ProphetNetModel
--> 199 from ..rag.modeling_rag import ( # noqa: F401 - need to import all RagModels to be in globals() function
200 RagModel,
201 RagSequenceForGeneration,
/opt/conda/lib/python3.7/site-packages/transformers/models/rag/modeling_rag.py in
27 from …utils import logging
28 from .configuration_rag import RagConfig
---> 29 from .retrieval_rag import RagRetriever
30
31
/opt/conda/lib/python3.7/site-packages/transformers/models/rag/retrieval_rag.py in
37
38 if is_datasets_available():
---> 39 from datasets import Dataset, load_dataset, load_from_disk
40
41 if is_faiss_available():
/opt/conda/lib/python3.7/site-packages/datasets/init.py in
31 )
32
---> 33 from .arrow_dataset import Dataset, concatenate_datasets
34 from .arrow_reader import ArrowReader, ReadInstruction
35 from .arrow_writer import ArrowWriter
/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py in
44 from .arrow_writer import ArrowWriter, OptimizedTypedSequence
45 from .features import ClassLabel, Features, Value, cast_to_python_objects
---> 46 from .filesystems import extract_path_from_uri, is_remote_filesystem
47 from .fingerprint import (
48 fingerprint_transform,
/opt/conda/lib/python3.7/site-packages/datasets/filesystems/init.py in
7
8 if _has_s3fs:
----> 9 from .s3filesystem import S3FileSystem # noqa: F401
10
11
/opt/conda/lib/python3.7/site-packages/datasets/filesystems/s3filesystem.py in
----> 1 import s3fs
2
3
4 class S3FileSystem(s3fs.S3FileSystem):
5 """
/opt/conda/lib/python3.7/site-packages/s3fs/init.py in
----> 1 from .core import S3FileSystem, S3File
2 from .mapping import S3Map
3
4 from ._version import get_versions
5
/opt/conda/lib/python3.7/site-packages/s3fs/core.py in
9
10 from fsspec.spec import AbstractBufferedFile
---> 11 from fsspec.utils import infer_storage_options, tokenize, setup_logging
12 from fsspec.asyn import AsyncFileSystem, sync, sync_wrapper
13
ImportError: cannot import name 'setup_logging' from 'fsspec.utils' (/opt/conda/lib/python3.7/site-packages/fsspec/utils.py)
This has become show stopper for me in kaggle.The same code works in Colab.Please advice.**
Thanks,
Shyam.
fsspec==0.9.0 has the function fsspec.utils.setup_logging but earlier versions do not
Try pip install fsspec==0.9.0
see: https://githubmemory.com/repo/dask/s3fs/activity?page=3

%R magic no longer works in IPython or Jupyter following update to Canopy Ver 1.7.4.3348

Previously %R and %%R magics were working in IPython and Jupyter python notebooks.
The R terminal version is:
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin13.4.0 (64-bit)
After upgrading to Version 1.7.4.3348 in Enthought Canopy, the notebooks and IPython no longer work. I have tried reinstalling following Installing RKernel and http://irkernel.github.io/installation/, which worked before. I run the command to load the R-extension as per
%load_ext rpy2.ipython
I get the error message as follows:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-2-691c6d73b073> in <module>()
----> 1 get_ipython().magic(u'load_ext rpy2.ipython')
/Users/Llewelyn_home/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc in magic(self, arg_s)
2161 magic_name, _, magic_arg_s = arg_s.partition(' ')
2162 magic_name = magic_name.lstrip(prefilter.ESC_MAGIC)
-> 2163 return self.run_line_magic(magic_name, magic_arg_s)
2164
2165 #-------------------------------------------------------------------------
/Users/Llewelyn_home/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc in run_line_magic(self, magic_name, line)
2082 kwargs['local_ns'] = sys._getframe(stack_depth).f_locals
2083 with self.builtin_trap:
-> 2084 result = fn(*args,**kwargs)
2085 return result
2086
<decorator-gen-64> in load_ext(self, module_str)
/Users/Llewelyn_home/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/IPython/core/magic.pyc in <lambda>(f, *a, **k)
191 # but it's overkill for just that one bit of state.
192 def magic_deco(arg):
--> 193 call = lambda f, *a, **k: f(*a, **k)
194
195 if callable(arg):
/Users/Llewelyn_home/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/IPython/core/magics/extension.pyc in load_ext(self, module_str)
64 if not module_str:
65 raise UsageError('Missing module name.')
---> 66 res = self.shell.extension_manager.load_extension(module_str)
67
68 if res == 'already loaded':
/Users/Llewelyn_home/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/IPython/core/extensions.pyc in load_extension(self, module_str)
82 if module_str not in sys.modules:
83 with prepended_to_syspath(self.ipython_extension_dir):
---> 84 __import__(module_str)
85 mod = sys.modules[module_str]
86 if self._call_load_ipython_extension(mod):
/Users/Llewelyn_home/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/rpy2/ipython/__init__.py in <module>()
----> 1 from .rmagic import load_ipython_extension
/Users/Llewelyn_home/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/rpy2/ipython/rmagic.py in <module>()
57 template_converter = ro.conversion.converter
58 try:
---> 59 from rpy2.robjects import pandas2ri as baseconversion
60 template_converter = template_converter + baseconversion.converter
61 except ImportError:
/Users/Llewelyn_home/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/rpy2/robjects/pandas2ri.py in <module>()
7 INTSXP)
8
----> 9 from pandas.core.frame import DataFrame as PandasDataFrame
10 from pandas.core.series import Series as PandasSeries
11 from pandas.core.index import Index as PandasIndex
/Users/Llewelyn_home/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/pandas/__init__.py in <module>()
20
21 # numpy compat
---> 22 from pandas.compat.numpy_compat import *
23
24 try:
/Users/Llewelyn_home/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/pandas/compat/numpy_compat.py in <module>()
13
14 # numpy versioning
---> 15 _np_version = np.version.short_version
16 _np_version_under1p8 = LooseVersion(_np_version) < '1.8'
17 _np_version_under1p9 = LooseVersion(_np_version) < '1.9'
AttributeError: 'module' object has no attribute 'version'
Could it be related to Canopy version of numpy being listed as 1.10.4-1 and the np.version result being 1.11.1 (based on error message)? Any suggestions gratefully received. PS. R works in the console still, plus in terminal and in Jupyter with an R kernel...
The support crew at Enthought examined the version of numpy, then pandas. Reinstalling both did not solve the problem. The unexplained resolution occurred from the pip install theano --upgrade command on the Canopy Terminal. Logging this error as an unexplained issue with %R but with the strong indication that it is about dependency version.

Issues running rmagic in IPython - Yosemite

I'm currently having issues trying to load rmagic into IPython since I upgraded to OSX Yosemite.
I'm using the following command:
%load_ext rmagic
Below is the error I'm getting, and I'm not sure if it's because I upgraded to Yosemite or because I'm trying to load R incorrectly. I've pasted all the Traceback in case that's useful, but the error ends in
ImportError: cannot import name conversion
My R version is 3.1.1
My Python version is 2.7.6
My IPython version is 2.3.0
Not sure what version rpy2 is, but I only downloaded it a few days ago so I assume it's the latest.
ImportError Traceback (most recent call last)
<ipython-input-7-691c6d73b073> in <module>()
----> 1 get_ipython().magic(u'load_ext rpy2.ipython')
/Library/Python/2.7/site-packages/IPython/core/interactiveshell.pyc in magic(self, arg_s)
2203 magic_name, _, magic_arg_s = arg_s.partition(' ')
2204 magic_name = magic_name.lstrip(prefilter.ESC_MAGIC)
-> 2205 return self.run_line_magic(magic_name, magic_arg_s)
2206
2207 #-------------------------------------------------------------------------
/Library/Python/2.7/site-packages/IPython/core/interactiveshell.pyc in run_line_magic(self, magic_name, line)
2124 kwargs['local_ns'] = sys._getframe(stack_depth).f_locals
2125 with self.builtin_trap:
-> 2126 result = fn(*args,**kwargs)
2127 return result
2128
/Library/Python/2.7/site-packages/IPython/core/magics/extension.pyc in load_ext(self, module_str)
/Library/Python/2.7/site-packages/IPython/core/magic.pyc in <lambda>(f, *a, **k)
191 # but it's overkill for just that one bit of state.
192 def magic_deco(arg):
--> 193 call = lambda f, *a, **k: f(*a, **k)
194
195 if callable(arg):
/Library/Python/2.7/site-packages/IPython/core/magics/extension.pyc in load_ext(self, module_str)
61 if not module_str:
62 raise UsageError('Missing module name.')
---> 63 res = self.shell.extension_manager.load_extension(module_str)
64
65 if res == 'already loaded':
/Library/Python/2.7/site-packages/IPython/core/extensions.pyc in load_extension(self, module_str)
96 if module_str not in sys.modules:
97 with prepended_to_syspath(self.ipython_extension_dir):
---> 98 __import__(module_str)
99 mod = sys.modules[module_str]
100 if self._call_load_ipython_extension(mod):
/Library/Python/2.7/site-packages/rpy2/ipython/__init__.py in <module>()
----> 1 from .rmagic import load_ipython_extension
/Library/Python/2.7/site-packages/rpy2/ipython/rmagic.py in <module>()
51
52 import rpy2.rinterface as ri
---> 53 import rpy2.robjects as ro
54 import rpy2.robjects.packages as rpacks
55
/Library/Python/2.7/site-packages/rpy2/robjects/__init__.py in <module>()
16 import rpy2.rlike.container as rlc
17
---> 18 from rpy2.robjects.robject import RObjectMixin, RObject
19 from rpy2.robjects.vectors import *
20 from rpy2.robjects.functions import Function, SignatureTranslatedFunction
/Library/Python/2.7/site-packages/rpy2/robjects/robject.py in <module>()
5 rpy2.rinterface.initr()
6
----> 7 from . import conversion
8
9 class RObjectMixin(object):
ImportError: cannot import name conversion
Minrk had it right - uninstalling and reinstalling rpy2 fixed my problem. Not sure why I didn't think of that before! Thanks.

XLDateAmbiguous error even when using dayfirst argument

I'm trying to import data into a pandas dataframe object from an excel spreadsheet parsing dates. I'm using dayfirst however I still get an error XLDateAmbiguous (docs)
The dates are in a single column in the format 25/09/1990
Could somebody explain to me why this happening and how I can fix it? Thanks in advance.
Edit: It seems as though the problem is caused by xlrd attempting to parse a non-date column as a date even thought I've specified which column the dates are in. Unfortunately I don't know how to explicitly indicate that a column should not be parsed as dates. Does anybody have any ideas?
import pandas as pd
import matplotlib.pyplot as plt
from datetime import datetime
import dateutil
path6 = 'C:\\Users\\Site2_Homepage_2013-06-04.xlsx'
df8 = pd.io.excel.read_excel(path6, 'Site2_Homepage_2012_06_13', header=1, parse_dates=True, dayfirst=True)
XLDateAmbiguous Traceback (most recent call last)
<ipython-input-17-4a83d104ab72> in <module>()
4 path7 = 'C:\\Users\\Site4_Homepage_2013-06-04.xlsx'
5 path8 = 'C:\\Users\\Site7_Homepage_2013-06-04.xlsx'
----> 6 df8 = pd.io.excel.read_excel(path6, 'Site2_Homepage_2012_06_13', header=1, parse_dates=True, dayfirst=True)
7 df9 = pd.io.excel.read_excel(path7, 'Site4_Homepage_2012_06_13', header=1, parse_dates=[3], dayfirst=True)
8 df10 = pd.io.excel.read_excel(path8, 'Site7_Homepage_2012_06_13', header=1, parse_dates=[3], dayfirst=True)
C:\Users\AppData\Local\Enthought\Canopy32\User\lib\site-packages\pandas\io\excel.pyc in read_excel(io, sheetname, **kwds)
101 engine = kwds.pop('engine', None)
102
--> 103 return ExcelFile(io, engine=engine).parse(sheetname=sheetname, **kwds)
104
105
C:\Users\AppData\Local\Enthought\Canopy32\User\lib\site-packages\pandas\io\excel.pyc in parse(self, sheetname, header, skiprows, skip_footer, index_col, parse_cols, parse_dates, date_parser, na_values, thousands, chunksize, convert_float, has_index_names, **kwds)
206 skip_footer=skip_footer,
207 convert_float=convert_float,
--> 208 **kwds)
209
210 def _should_parse(self, i, parse_cols):
C:\Users\AppData\Local\Enthought\Canopy32\User\lib\site-packages\pandas\io\excel.pyc in _parse_excel(self, sheetname, header, skiprows, skip_footer, index_col, has_index_names, parse_cols, parse_dates, date_parser, na_values, thousands, chunksize, convert_float, **kwds)
267 if parse_cols is None or should_parse[j]:
268 if typ == XL_CELL_DATE:
--> 269 dt = xldate_as_tuple(value, datemode)
270 # how to produce this first case?
271 if dt[0] < datetime.MINYEAR: # pragma: no cover
C:\Users\AppData\Local\Enthought\Canopy32\User\lib\site-packages\xlrd\xldate.pyc in xldate_as_tuple(xldate, datemode)
78
79 if xldays < 61 and datemode == 0:
---> 80 raise XLDateAmbiguous(xldate)
81
82 jdn = xldays + _JDN_delta[datemode]
XLDateAmbiguous: 15.3
I didn't manage to find a solution of this. In the end I had to use .csv versions of the files for the dates to parse correctly.

Resources