-
Notifications
You must be signed in to change notification settings - Fork 119
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
add function concat() #190
Conversation
No tests yet, mea culpa |
ok, ready for review |
seems like an erroneous test failure, restarting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @gidden, really nice new feature!
As commented, append()
is more powerful and takes multiple input types.
The new function concat()
could easily resolve #168 by checking in the IamDataFrame
constructor if data
is a list and calling pyam.concat()
. Then read_files()
would ever only have to read one file at a time.
Hey @danielhuppmann, I was thinking about this and I am not sure what the best strategy is here. I understand trying to make things as "easy to use as possible", but we also need to balance that with a well designed and extendable code base. I am wary to try to start casting things all over the place in the internals (even though it sounds like we have already tried to start doing so). It would seems much more reasonable from a design perspective to have users either explicitly use a constructor or some other explicit casting function ( Just as an example, the code as written now fails the test I wrote if I take out this type check (because it doesn't explicitly cast the string to a df and then fails). Happy to talk more as you wish. |
I see your point in principle, @gidden, but I disagree when it comes to operations like Three arguments:
Re the failing unit test - yes, true, the first item of the list will also have to be cast. But then, calling |
Ok, per an in-person discussion, we agreed to leave this existing PR as is and move the discussion to an issue for future consideration. |
this failure has to do with travis' windows ci, which is still in beta. we still have windows covered on appveyor, so this is able to be pulled in. @danielhuppmann mind doing the honors? |
happy to oblige, @gidden! |
Please confirm that this PR has done the following:
Description of PR
This adds a
concat()
function a lapandas
utilizing ourappend()
function