Merging Data from WRDS with Local Data #25
-
Hi, I'm working with the
Is there any way to accomplish something similar in python using the Thanks in advance for any comments or suggestions! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi Tim, It's been a long time since you asked this question, and you've probably figured it out by now. But for others who may be interested, I'd suggest using f-strings (available in Python 3.6+) to create your raw SQL string Assuming you already have a
I hope that helps! -Hugh |
Beta Was this translation helpful? Give feedback.
Hi Tim,
It's been a long time since you asked this question, and you've probably figured it out by now. But for others who may be interested, I'd suggest using f-strings (available in Python 3.6+) to create your raw SQL string
between
fromdf.date.max()
anddf.date.min()
, and then use the PandasDataFrame.merge()
function to do the inner join.Assuming you already have a
df
with at leastpermno
(float) anddate
(datetime), try something like this:I hope that helps!
-Hugh