PY3.5 and nnumpy and scipy installation problem

2015-09-25 Thread Ek Esawi
Hi All—

I am a beginner in Python and new to this list, but I am an experienced
programming in a few other languages.


Last year I installed numpy and scipy for Python3.3 on my computer with
windows 7, 64 bit OS. Today I downloaded Python3.5, but I the installation
for numpy 1.9.2 or 1.9.3 nor scipy 0.16.0 did work on the same computer.
Basically the setup for both numpy and scipy did not work. Any ideas are
greatly appreciated.


Thanks in advance,


Sincerely, EKE
-- 
https://mail.python.org/mailman/listinfo/python-list


PY3.5 and nnumpy and scipy installation problem

2015-09-27 Thread Ek Esawi
Hi Steven,


Thank you for the prompt response. What I meant by not working is the
following: once I had py3.5 working, I downloaded numpy and scipy and
unzipped them. After that I tried to install them. But there is no install
file for either. There was a setup file which I thought would do the same.
However, when I double clicked it, it showed a python window for a sec and
that’s all.


When I went to IDEL and typed import numpy as np I got the following error
message which suggests PY did not find numpy.


>>> import numpy as np

Traceback (most recent call last):

  File "", line 1, in 

import numpy as np

ImportError: No module named 'numpy'

>>>



Thanks again, EK
-- 
https://mail.python.org/mailman/listinfo/python-list


PY3.5 and nnumpy and scipy installation problem

2015-09-29 Thread Ek Esawi
Hi All again—


Thanks to all who have provided excellent tips for installing Python,
Numpy, Scipy, etc. Paul suggested the use Anaconda which proved to be the
best and easiest way for me.


If I may add I stumbled on an academic site that spells out in great
details how to install Python, numpy, scipy and others which helped me
greatly. For any installation issue here is the link


http://www.southampton.ac.uk/~fangohr/blog/installation-of-python-spyder-numpy-sympy-scipy-pytest-matplotlib-via-anaconda.html


Thanks again---EK
-- 
https://mail.python.org/mailman/listinfo/python-list


Pandas' loading a CSV file problem

2015-10-22 Thread Ek Esawi
Hi All---

I am new to Pandas. I am trying to load a csv file into pandas using



 import pandas as pd

f = pd.read_csv(OSATemp.csv')



Even though I was able to read and manipulate the file in Python343, in
Pandas the file could not be loaded. When I run the above statement, I get
a series of massages such as



Traceback (most recent call last):

File "C:\Users\EK Esawi\Anaconda3\Scripts\file1.py", line 3, in 

f = pd.read_csv('c:/Users/EK Esawi/My Documents/Temp/GOSATemp.csv')

  File "C:\Users\EK
Esawi\Anaconda3\lib\site-packages\pandas\io\parsers.py", line 474, in
parser_f



Any help/suggestion is greatly appreciated—EKE



Here is a sample of my csv file:



120891

120891

120873

120890

120890

120754

120891

120890

120890

O

Geyser

RT

Time

Interval

Duration

Preplay

Height

Prediction

42

Old Faithful

8:16

3:00

43

Old Faithful

9:55

1:39

4:15

9:41

130+

9:49

44

Old Faithful

11:33

1:38

3:59

11:20

130

11:28

45

Old Faithful

13:00

1:27

4:00

13:00

140

13:06

46

Old Faithful

14:42

1:42

3:44

14:29

150

14:33

47

Old Faithful

16:08

1:26

>4:00

16:02

140+

16:15

56

Castle

E

9:36

9:40ie

75

Old Faithful

7:23

>3:00

76

Old Faithful

9:05

1:42

4:13

8:52

150

8:05

77

Old Faithful

10:37

1:32

4:08

10:32

130

10:38

78

Old Faithful

12:02

1:25

3:00

11:59

130

12:10

79

Old Faithful

13:38

1:36

>3:30

13:27

13:00

80

Old Faithful

15:08

1:30

4:05

15:02

15:01

81

Old Faithful

16:42

1:34

3:54

16:32

150

16:41
-- 
https://mail.python.org/mailman/listinfo/python-list


Pandas' loading a CSV file problem

2015-10-22 Thread Ek Esawi
Here is the whole output. EKE

Traceback (most recent call last):

  File "C:\Users\EK Esawi\Anaconda3\Scripts\MyFile.py", line 3, in 

f = pd.read_csv('c:/Users/EK Esawi/My Documents/Temp/GOSATemp1.csv')

  File "C:\Users\EK
Esawi\Anaconda3\lib\site-packages\pandas\io\parsers.py", line 474, in
parser_f

return _read(filepath_or_buffer, kwds)

  File "C:\Users\EK
Esawi\Anaconda3\lib\site-packages\pandas\io\parsers.py", line 260, in _read

    return parser.read()

  File "C:\Users\EK
Esawi\Anaconda3\lib\site-packages\pandas\io\parsers.py", line 721, in read

    ret = self._engine.read(nrows)

  File "C:\Users\EK
Esawi\Anaconda3\lib\site-packages\pandas\io\parsers.py", line 1170, in read

data = self._reader.read(nrows)

  File "pandas\parser.pyx", line 769, in pandas.parser.TextReader.read
(pandas\parser.c:7544)

  File "pandas\parser.pyx", line 791, in
pandas.parser.TextReader._read_low_memory (pandas\parser.c:7784)

  File "pandas\parser.pyx", line 866, in
pandas.parser.TextReader._read_rows (pandas\parser.c:8617)

  File "pandas\parser.pyx", line 973, in
pandas.parser.TextReader._convert_column_data (pandas\parser.c:9928)

  File "pandas\parser.pyx", line 1033, in
pandas.parser.TextReader._convert_tokens (pandas\parser.c:10714)

  File "pandas\parser.pyx", line 1130, in
pandas.parser.TextReader._convert_with_dtype (pandas\parser.c:12118)

  File "pandas\parser.pyx", line 1150, in
pandas.parser.TextReader._string_convert (pandas\parser.c:12332)

  File "pandas\parser.pyx", line 1382, in pandas.parser._string_box_utf8
(pandas\parser.c:17655)

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb1 in position 8:
invalid start byte
-- 
https://mail.python.org/mailman/listinfo/python-list


Pandas' loading a CSV file problem

2015-10-22 Thread Ek Esawi
Thanks you all for the input. Michiel's suggestion worked. At first It gave
me an error about "low_memory"; once i sat low_memory to false, it worked.

I am new to pandas and i am working on a 20,000 record csv file with mixed
data types and in many cases, one entry (cell)  has a combination of string
and numeric values which will eventually be separated.

Thanks again-EK
-- 
https://mail.python.org/mailman/listinfo/python-list


cvxopt install problem

2015-11-03 Thread Ek Esawi
Hi All—





I needed to install cvxopt on a 64 bit W7. I found out that cvxopt is
incompatible with a 64 bit. It only compatible with a 32 bit which can be
installed on a 64 bit computer and it works. I stumbled on this on another
discussion group posting. The suggestion was to install python 32 bit on a
64 bit computer, then download cvxopt and install it via conda.



Here is the suggestion from the posting  [If you are using Windows, an easy
solution could be the Anaconda distribution (http://continuum.io/downloads).
Select and install the 32 bit version. It will be easier to install the
cvxopt package. Search it in the binstar repository (
https://binstar.org/search?q=cvxopt). Open a console terminal and install
it (e. g. "conda install -chttps://conda.binstar.org/omnia cvxopt").?]



I did everything except the last command to install cvxopt, that’s “conda
install -chttps://conda.binstar.org/omnia cvxopt".

Here is the command I used:

conda install c:/Users/eesawi0001/Downloads/cvxopt-1.1.7-py34.tar

I kept getting invalid syntax



Any help is greatly appreciated.


EKE
-- 
https://mail.python.org/mailman/listinfo/python-list


Pandsa to Excel conversion issue

2021-06-01 Thread EK Esawi via Python-list
Hi All--


I am using Pandas to read an excel file which is very "dirty" and needs 
cleaning. I read the file via pandas and did not setup dtypes or converters 
hoping i can do so later.. When i run my code, most columns did come out as 
strings but i cannot convert them to float or integer using astype or pandas.to 
numeric method. Every time i tried, i get the same error listed below



Here is my code

import pandas as pd
import numpy as np

MyFile='C:/Users/Temp.xlsx'
df=pd.read_excel(io=MyFile, nrows=100)


The error message i get when i tried to convert a string like '22.3' via astype 
or pd.to_numeric is below


Unable to parse string "22." at position 0


Thanks in advance


EK
-- 
https://mail.python.org/mailman/listinfo/python-list