pandas


mapping values from another pandas df


I have a pandas dataframe called females:
iid id gender idg condtn wave round position positin1 order \
0 1 1.0 0 1 1 1 10 7 NaN 4
1 1 1.0 0 1 1 1 10 7 NaN 3
and so on. each iid has around ten rows
and in total there are around 3500 rows.
I also have a dataframe:
females_scores = pd.DataFrame(columns=['iid', 'Number Matches', 'Number Decisions', 'Match Rate', ' Decision Rate'])
which has data on each iid.
My question:
What is the best way to add a column in the first dataframe (females) that maps the "Number Decisions" in the second dataframe according to iid, to every row in the first dataframe?
I was thinking of using np.where, but this would return an array? Im not sure what the best path is tbh
thanks in advance!

Related Links

Pandas Dataframe - Using index as value when slicing/filtering
How can I select out columns where the first values are NaN?
Record limitation in pandas dataframe when importing from a csv file
count of unique values in pandas dataframe column
Rolling sums on pandas dataframe
Pandas Bug - Error when inserting list serialize as string
Formatting index of a pandas table in a plot
resample over consecutive chunks of large size CSV
Too many possibilities for categorical fields
How to install pandas on virtual machine?
How to change particular column value when defined mask is true?
Pandas/NumPy: concisely label first N values matching a mask
fast way to make index prefix with an alphabet
Is there a way to better format Pandas data frames when printing them in Sublime text?
Pandas pivot certain rows to columns
Combine three dataframes

Categories

HOME
winforms
zeromq
urbancode
image-processing
isabelle
ngrx
cplex
at-command
jira
pivotal-cloud-foundry
django-imagekit
bs4
izpack
numeral.js
hex-editors
iolanguage
tostring
windows-7-x64
ef-migrations
angular-ui
serilog
jtextfield
object-detection
accessor
blazemeter
opennlp
kannel
entitlements
opentype
tasklet
delicious-api
skia
lightswitch-2013
oracle-fusion-middleware
fog
copying
calibre
ghost4j
force-layout
main
x11-forwarding
twitch
theano.scan
unobtrusive-validation
eclipse-scout
node-gyp
botbuilder
bootstrap-dialog
total-commander
businessworks
convertapi
appcompat
dandelion
jlink
carrot
libusb-win32
color-profile
fody
underscore.js-templating
mathematica-frontend
moveit
ubuntu-10.04
hill-climbing
essence
sdf
hexdump
two-factor-authentication
energy
coveralls
emailrelay
android-listview
cctv
html-helper
bitcoinj
uitouch
comexception
srs
typo3-neos
imdbpy
flexmojos
uv-mapping
xamlparseexception
html-editor
enterprisedb
wsdl-2.0
newtonscript
nsdatecomponents
libc++
xmemcached
cinema-4d
xfbml
subviews
.nettiers
routedevent
firefox-5
webkit.net

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App