예제 #1
0
        public void TestApply()
        {
            var t1 = new Series(new double[] { 1, 2, 3, 4 });
            var t2 = t1.Apply("(x, i) => (double)column[column.Count - 1 - i]");

            Assert.Equal(new double[] { 4, 3, 2, 1 }, t2.UnderlyingList);
        }
예제 #2
0
        public void TestRegex()
        {
            var t1 = new Series(new[] { "abc1", "abc2", "def" });

            var t2 = t1.Apply(@"(x, i) => Regex.Match(x, @""abc\d"").Success", typeof(bool));

            Assert.Equal(new[] { true, true, false }, t2.UnderlyingList);
        }