Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8936529
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T10:14:02+00:00 2026-06-15T10:14:02+00:00

Suppose I have two DataFrames a & b where a is larger than b

  • 0

Suppose I have two DataFrames a & b where a is larger than b and has all NaNs. b.index is a subset of a.index, however b has real values. I wish to merge the values from b into a.

In [102]: mset

Out[102]: 
<class 'pandas.core.frame.DataFrame'>
DatetimeIndex: 9446 entries, 2012-11-02 07:00:00 to 2012-11-05 15:24:00
Data columns:
open     9207  non-null values
high     9207  non-null values
low      9207  non-null values
close    9207  non-null values
dtypes: float64(4)

In [103]: a
Out[103]: 
<class 'pandas.core.frame.DataFrame'>
DatetimeIndex: 1440 entries, 2012-11-14 00:00:00 to 2012-11-14 23:59:00
Freq: T
Data columns:
open     0  non-null values
high     0  non-null values
low      0  non-null values
close    0  non-null values
dtypes: float64(4)

There’s an example of what the dataframes look like.

EDIT:

I’d also like to retain the index as well

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T10:14:03+00:00Added an answer on June 15, 2026 at 10:14 am

    Your example dataframes do not match the statement “b.index is a subset of a.index, however b has real values.” The dates are not overlapping. However:

    This works for integer indexes, don’t know about ts indexes:

    a.ix[a.index] = mset.ix[a.index]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose we have the contents of tables x and y in two dataframes in
I have two dataframes and I wish to insert the values of one dataframe
Suppose I have two columns, keywords and content. I have a fulltext index across
Suppose we have two tables. Post and Comment. Post has many Comments. Pretend they
Suppose I have two forms: Form1 and Form2. Form2 has a text control named
Suppose you have two tables in PostgreSQL. Table A has field x , which
Suppose I have two pages: - page 1 uses jquery mobile and has a
Suppose I have two tables: TABLE1: Has a list of IDs I need to
Suppose you have two datetime values, date_a and date_b What expression evaluates to true
Suppose I have two instances of the same class. The class has a pointer

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.