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

Group multiple variables by multiple variables?
Merging Two Rows Into One Longer Row (Pandas)
How do I find the closest values in a Pandas series to an input number?
Calculating group average and assigning it to sub-group using Pandas groupby
Pandas bar plot changes date format
pandas pie chart plot remove the label text on the wedge
pandas: optimizing my code (groupby() / apply())
Indexing on Pandas Grouby Data frame Gives error
Python 3.4 Pandas DataFrame Structuring
Python3.4 Pandas DataFrame from function
Select the row and column element of a dataframe and decide the regression variables
Apply function with pandas dataframe - POS tagger computation time
pandas: trouble transforming dataframe into aggregated dataframe
Python: Pandas to latex - Issues with the backslash
dropping rows in pandas dataframe based on column entries
Pandas dataframe apply function

Categories

HOME
pandas
google-chrome-extension
wso2-am
proxy
relative-path
electron
vmware
react-router
octobercms
cvs
spring-cloud-stream
ckeditor
flyway4
datastax-java-driver
convolution
append
vault
zend-framework3
windows-phone-7
fortumo
percona
serverless-framework
visjs
accessor
mmap
icloud-api
dxf
java-7
facet
poltergeist
bootstrap-duallistbox
user-interaction
traffic
fgetcsv
greendao
ejabberd-module
gitignore
unboundid
google-sites-2016
protovis
openoffice.org
ghost4j
nssegmentedcontrol
qwerty
xcode-extension
android-browser
hilbert-curve
ansible-playbook
mesos-chronos
s
businessworks
sas-jmp
scorm
parentheses
multipeer-connectivity
yii2-extension
lowpass-filter
recursive-datastructures
nativeapplication
medium.com
savon
intel-fortran
ora-00900
marching-cubes
jmeter-maven-plugin
android-listview
ionic
tableau-online
ideamart
service-accounts
twirl
splash
pretty-print
umbraco6
uitouch
funcunit
jubula
sabredav
mhtml
mt
automount
asyncfileupload
assembly-loading
qt-jambi
pydot
vdsp
web-application-design
.nettiers
castle-monorail
virtual-functions
mediarss
scripting-languages

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App