A personal diary of DataFrame munging over the years.
Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)
| #pragma once | |
| #include <QObject> | |
| //See Gist Comment for description, usage, warnings and license information | |
| #define AUTO_PROPERTY(TYPE, NAME) \ | |
| Q_PROPERTY(TYPE NAME READ NAME WRITE NAME NOTIFY NAME ## Changed ) \ | |
| public: \ | |
| TYPE NAME() const { return a_ ## NAME ; } \ | |
| void NAME(TYPE value) { \ | |
| if (a_ ## NAME == value) return; \ | |
| a_ ## NAME = value; \ |
A personal diary of DataFrame munging over the years.
Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)