Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Binary operations on int DataMatrix #3

Closed
wesm opened this issue Sep 29, 2010 · 1 comment
Closed

Binary operations on int DataMatrix #3

wesm opened this issue Sep 29, 2010 · 1 comment

Comments

@wesm
Copy link
Member

wesm commented Sep 29, 2010

Reported by kwgoodman, Jun 12, 2010
When adding two int DataMatrix's a ValueError is raised when matrix.py attempt to fill missing values with NaN:

dma1 = pandas.DataMatrix([[1, 2], [3, 4]], ['a', 'b'], ['c', 'd'])
dma2 = pandas.DataMatrix([[1, 2], [3, 4]], ['b', 'a'], ['d', 'c'])
dma1 + dma2

ValueError: cannot convert float NaN to integer

Delete comment Comment 1 by kwgoodman, Jun 12, 2010
Possible fix:

x = np.array([1.0])
issubclass(x.dtype.type, np.inexact)
True
x = np.array([1])
issubclass(x.dtype.type, np.inexact)
False
x = np.array([1.0], dtype=object)
issubclass(x.dtype.type, np.inexact)
False
x = np.array([1.0], dtype=str)
issubclass(x.dtype.type, np.inexact)
False

@wesm
Copy link
Member Author

wesm commented Jan 1, 2011

I guess I "accidentally" fixed this via some routine refactoring / code cleanup

RahulHP added a commit to RahulHP/pandas that referenced this issue May 27, 2016
RahulHP added a commit to RahulHP/pandas that referenced this issue May 28, 2016
ENH: support decimal option in PythonParser pandas-dev#12933

closes pandas-dev#12933

Author: Camilo Cota <ccota@riplife.es>

Closes pandas-dev#13189 from camilocot/12933 and squashes the following commits:

465272e [Camilo Cota] Benchmark decimal option in read_csv for c engine
9f42d0c [Camilo Cota] double backticks around decimal and engine='python'
dc8ca62 [Camilo Cota] fix test_empty_decimal_marker comment
49613fe [Camilo Cota] Assert read_csv error message in test_empty_decimal_marker
d821052 [Camilo Cota] fix test_empty_decimal_marker comment
f71509d [Camilo Cota] Include descritive what's new line
803356e [Camilo Cota] set nonnum regex in init method
1472d80 [Camilo Cota] Include the issue number in what's new
b560fda [Camilo Cota] Fix what's new
dc7acd1 [Camilo Cota] ENH: support decimal option in PythonParser pandas-dev#12933

ENH: Allow to_sql to recognize single sql type pandas-dev#11886

PEP pandas-dev#3
dan-nadler pushed a commit to dan-nadler/pandas that referenced this issue Sep 23, 2019
…_timezone_inconsistency to master

* commit 'fc8eafdf5528a6fe52d1f471a9cdf9454e81f6e6':
  MDP-448 to_dt should respect default_tz for ms since epoch datetimes         Add unit tests
  MDP-448 Make ms_to_datetime always return a non-naive datetime.datetime
  MDP-448 remove debug print
  MDP-448 Fix arctic_copy_data. If the VersionStore data has no TimeZone then don't slice the the original_data using a timezone during --spliceing
  MDP-448 to_pandas_closed_closed now does an implicit to_dt
  MDP-448 Ensure we use non-naive datetimes for the Mongo query in the read-path
  MDP-448 Ensure we set a TimeZone on the returned DataFrame on tickstore.read. We store time as ms since epoch, and this will prevent confusion on interpretation with naive DateTimes on read.
meeseeksmachine pushed a commit to meeseeksmachine/pandas that referenced this issue Aug 10, 2020
simonjayhawkins pushed a commit that referenced this issue Aug 10, 2020
…on-numeric dtypes #3… (#35652)

Co-authored-by: Isaac Virshup <ivirshup@gmail.com>
phofl referenced this issue in phofl/pandas Aug 16, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant