Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat request: join multiple obs_seq instances. #7

Open
hkershaw-brown opened this issue May 17, 2024 · 0 comments
Open

Feat request: join multiple obs_seq instances. #7

hkershaw-brown opened this issue May 17, 2024 · 0 comments

Comments

@hkershaw-brown
Copy link
Member

Question:

  • is it sufficient to join the data frames?
  • is a blank obs_seq instance necessary to fill up with obs sequence, or just join existing obs sequence instances?

just dataframes:

class obs_sequence:
    ...
    def join_obs_sequences(self, obs_sequences):
        """Join multiple obs_sequence instances.

        Args:
            obs_sequences (list): List of obs_sequence instances.

        Returns:
            pandas.DataFrame: Joined DataFrame of all obs_sequences.
            
        """
        return pd.concat([obs.df for obs in obs_sequences])

obs_seq1 = obs_sequence('/path/to/obs_seq1.ascii')
obs_seq2 = obs_sequence('/path/to/obs_seq2.ascii')
obs_seq3 = obs_sequence('/path/to/obs_seq3.ascii')

joined_df = obs_seq1.join_obs_sequences([obs_seq2, obs_seq3])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant