question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

API: allow dependent assignment?

See original GitHub issue

Since kwarg order will be guaranteed in python 3.6, we could allow this…though would only want to try with a 3.6+ version check, otherwise code could more or less randomly work/not work, depending on dict order.

In [44]: df = pd.DataFrame({'a': [1,2,3]})

In [45]: df.assign(b=1, c=lambda x: x['b'] * 2)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:19 (19 by maintainers)

github_iconTop GitHub Comments

1reaction
TomAugspurgercommented, Sep 21, 2017

I think we should sort this out for 0.21. I propose

  • No change to 2.7 - 3.5; order is sorted by key
  • For 3.6+, we use the original order the user passed in
  • We don’t allow dependent assignment yet

Maybe in the future, when there’s less 3.5 and lower code around, we can allow for dependent assignment.

1reaction
shoyercommented, Feb 9, 2017

I would also be comfortable just changing this for Python 3.6+. My guess is that there aren’t that many folks using Python 3.6 in production yet, so this will probably cause minimal issues.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Completing Assignments Using API - What is Decisions?
This document demonstrates how to Call Internal Services via API Calls, to complete Assignments in Decisions. This is completed with the ...
Read more >
Owners and Dependents - Kubernetes
Owners and Dependents. In Kubernetes, some objects are owners of other objects. For example, a ReplicaSet is the owner of a set of...
Read more >
Is there a way to make one assignment dependent on...
Is there a way to engineer it so that a student cannot submit an assignment before another one is completed WITHOUT making them...
Read more >
Assignments - Canvas LMS REST API Documentation
API for accessing assignment information. ... If included, only return certain assignments depending on due date and submission status. Allowed values: past ...
Read more >
Use Project schedule APIs to perform operations with ...
Project task dependency records aren't updated. Instead, an old record can be deleted, and a new record can be created. Resource assignment, Yes ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found