hosseinmoein / DataFrame

C++ DataFrame for statistical, Financial, and ML analysis -- in modern C++ using native types and contiguous memory storage
https://hosseinmoein.github.io/DataFrame/
BSD 3-Clause "New" or "Revised" License
2.54k stars 313 forks source link

Exceptions thrown in dataframe_tester #63

Closed swilson314 closed 4 years ago

swilson314 commented 4 years ago

I've built DataFrame with VS 2017 on Windows 10. A number of exceptions are thrown when I run dataframe_tester.exe.

The first occurs here, I think this test is wrong since the size of dvec is 1:

dvec = df3.get_column<double> ("dbl_col");
dvec2 = df3.get_column<double> ("dbl_col_2");
assert(dvec.size() == 1);
// SBW throws exception.
// assert(dvec[5] == 2.2345);

Other exceptions occur during the following tests, I stopped testing at this point:

// SBW throws exception.
// test_shifting_up_down();
test_rotating_up_down();
test_dataframe_with_datetime();
test_dataframe_friend_plus_operator();
test_dataframe_friend_minus_operator();
test_dataframe_friend_multiplies_operator();
test_dataframe_friend_divides_operator();
test_fill_missing_values();
test_fill_missing_fill_forward();
test_fill_missing_fill_backward();
// SBW throws exception.
// test_fill_missing_fill_linear_interpolation();
test_drop_missing_all_no_drop();
// SBW throws exception.
// test_drop_missing_all_2_drop();
// SBW throws exception.
// test_drop_missing_any();
hosseinmoein commented 4 years ago

I cannot reproduce these on any of my computers (MacOs, Ubuntu, and RedHat). It would be interesting to print out the values that are not matching, for example the timestamp that is not matching. I would also suggest you update timezone info on your machine

hosseinmoein commented 4 years ago

Also, are you sure you have the latest code in master?

swilson314 commented 4 years ago

See the screenshot Watch window for the value when the assert fires. The time zone on my machine is correctly set.

I dowloaded the code just moments before my testing. How do I verify that I have the “latest” version?

On Mon, Apr 6, 2020 at 12:04 PM Hossein Moein notifications@github.com wrote:

Also, are you sure you have the latest code in master?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/hosseinmoein/DataFrame/issues/63#issuecomment-609979722, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF3FXFS5VEKSTQK3GLANBLDRLIRTNANCNFSM4LX2AH3Q .

-- Sent from Gmail Mobile

hosseinmoein commented 4 years ago
  1. I cannot see the video. I get an error "Whoops! That unsubscribe link isn't valid for your account."
  2. If you downloaded the source today, than you are up to date.
  3. I didn't say your time zone is not set correctly. I am saying it looks like you time zone info are not up to date
swilson314 commented 4 years ago

1) I don't know what video you are talking about. From the screenshot you can see that the line that fails is assert(idx_vec[0]==151472800), while the Locals windows shows idx_vec[0] = 1514793600. 3) You will need to give me specific instructions if you want me to try something else because I don't know what you're suggesting.

hosseinmoein commented 4 years ago

I am very confused. You say this line fails

assert(idx_vec[0]==151472800),

This line does not exist anywhere in the codebase. Where do you see it? Do you mean this line?

assert(idx_vec1[0] == 1514782800)

In which case it makes sense. The diff between 1514782800 (in my code) and 1514793600 (what you see) is 3 hours. That is the diff between PST and EST. That means that my program failed to change the timezone of the test process to EST. So you are still running the process in local (PST) timezone. Maybe you should run the test executable as an admin on your host.

hosseinmoein commented 4 years ago

Can you do another pull from the codebase? I did some changes that might solve your timezone issues.

swilson314 commented 4 years ago

The assert now occurs on a different line: assert(idx_vec1.size() == 768600) The size of the vec is 768960. The (previously bad) line assert(idx_vec1[0] == 1514782800) is now valid, per visual inspection of idx_vec1.