Search in sources :

Example 6 with IntColumn

use of tech.tablesaw.api.IntColumn in project symja_android_library by axkr.

the class DateTimeMapFunctions method hour.

default IntColumn hour() {
    IntColumn newColumn = IntColumn.create(name() + "[" + "hour" + "]");
    for (int r = 0; r < size(); r++) {
        if (!isMissing(r)) {
            long c1 = getLongInternal(r);
            newColumn.append(getHour(c1));
        } else {
            newColumn.appendMissing();
        }
    }
    return newColumn;
}
Also used : IntColumn(tech.tablesaw.api.IntColumn)

Example 7 with IntColumn

use of tech.tablesaw.api.IntColumn in project symja_android_library by axkr.

the class DateTimeMapFunctions method minuteOfDay.

default IntColumn minuteOfDay() {
    IntColumn newColumn = IntColumn.create(name() + "[" + "minute-of-day" + "]");
    for (int r = 0; r < size(); r++) {
        if (!isMissing(r)) {
            long c1 = getLongInternal(r);
            newColumn.append((short) getMinuteOfDay(c1));
        } else {
            newColumn.appendMissing();
        }
    }
    return newColumn;
}
Also used : IntColumn(tech.tablesaw.api.IntColumn)

Example 8 with IntColumn

use of tech.tablesaw.api.IntColumn in project symja_android_library by axkr.

the class DateTimeMapFunctions method secondOfDay.

default IntColumn secondOfDay() {
    IntColumn newColumn = IntColumn.create(name() + "[" + "second-of-day" + "]");
    for (int r = 0; r < size(); r++) {
        if (!isMissing(r)) {
            long c1 = getLongInternal(r);
            newColumn.append(getSecondOfDay(c1));
        } else {
            newColumn.appendMissing();
        }
    }
    return newColumn;
}
Also used : IntColumn(tech.tablesaw.api.IntColumn)

Example 9 with IntColumn

use of tech.tablesaw.api.IntColumn in project symja_android_library by axkr.

the class DateTimeMapFunctions method dayOfMonth.

default IntColumn dayOfMonth() {
    IntColumn newColumn = IntColumn.create(this.name() + " day of month", size());
    for (int r = 0; r < this.size(); r++) {
        if (!isMissing(r)) {
            long c1 = this.getLongInternal(r);
            newColumn.set(r, getDayOfMonth(c1));
        }
    }
    return newColumn;
}
Also used : IntColumn(tech.tablesaw.api.IntColumn)

Example 10 with IntColumn

use of tech.tablesaw.api.IntColumn in project symja_android_library by axkr.

the class DateTimeMapFunctions method minute.

default IntColumn minute() {
    IntColumn newColumn = IntColumn.create(name() + "[" + "minute" + "]", size());
    for (int r = 0; r < size(); r++) {
        if (!isMissing(r)) {
            long c1 = getLongInternal(r);
            newColumn.set(r, getMinute(c1));
        }
    }
    return newColumn;
}
Also used : IntColumn(tech.tablesaw.api.IntColumn)

Aggregations

IntColumn (tech.tablesaw.api.IntColumn)22 Table (tech.tablesaw.api.Table)7 StringColumn (tech.tablesaw.api.StringColumn)4 Map (java.util.Map)3 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)3 DoubleColumn (tech.tablesaw.api.DoubleColumn)2 TreeBasedTable (com.google.common.collect.TreeBasedTable)1 Byte2IntMap (it.unimi.dsi.fastutil.bytes.Byte2IntMap)1 Byte2IntOpenHashMap (it.unimi.dsi.fastutil.bytes.Byte2IntOpenHashMap)1 Byte2ObjectMap (it.unimi.dsi.fastutil.bytes.Byte2ObjectMap)1 Byte2ObjectOpenHashMap (it.unimi.dsi.fastutil.bytes.Byte2ObjectOpenHashMap)1 Int2IntMap (it.unimi.dsi.fastutil.ints.Int2IntMap)1 Int2IntOpenHashMap (it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap)1 Int2ObjectMap (it.unimi.dsi.fastutil.ints.Int2ObjectMap)1 Int2ObjectOpenHashMap (it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap)1 Object2ByteOpenHashMap (it.unimi.dsi.fastutil.objects.Object2ByteOpenHashMap)1 Object2IntOpenHashMap (it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap)1 Object2ShortOpenHashMap (it.unimi.dsi.fastutil.objects.Object2ShortOpenHashMap)1 Short2IntMap (it.unimi.dsi.fastutil.shorts.Short2IntMap)1 Short2IntOpenHashMap (it.unimi.dsi.fastutil.shorts.Short2IntOpenHashMap)1