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

Implement Calculate University or Study Match function #10

Closed
danielgrbacbravo opened this issue Nov 24, 2024 · 0 comments
Closed

Implement Calculate University or Study Match function #10

danielgrbacbravo opened this issue Nov 24, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@danielgrbacbravo
Copy link
Member

danielgrbacbravo commented Nov 24, 2024

in the distance_calculator.py file, we need a function that checks whether the university or study field of an incoming student matches with a local student. This will help assign a binary score for the match.

Function Details

Function Name: 'is_same_university'
Parameters:

  • incoming_student: A 'pd.Series` object representing the details of an incoming student.
  • local_student: A pd.Series object representing the details of a local student.
    Returns:
    A float (1.0 if there is a match, 0.0 if there isn't).
    Instructions:

Create the is_same_university function in the 'distance_calculator.py' file.

Inside the function

Compare the university fields of incoming_student and local_student.
Compare the study_field fields of incoming_student and local_student.
If either field matches, return 1.0; otherwise, return 0.0.
Write clean, readable code, and add a docstring to the function.

desired function header:

def is_same_university(incoming_student: pd.Series, local_student: pd.Series) -> float:
    """
    Check if the university or study field matches between an incoming and a local student.
    
    Parameters:
        incoming_student (pd.Series): Details of the incoming student.
        local_student (pd.Series): Details of the local student.

    Returns:
        float: 1.0 if there's a match in university or study field, 0.0 otherwise.
    """
    # Your code here
@danielgrbacbravo danielgrbacbravo added the enhancement New feature or request label Nov 24, 2024
@danielgrbacbravo danielgrbacbravo moved this from Todo to In Progress in ESN Buddy Matching Program Dec 6, 2024
@danielgrbacbravo danielgrbacbravo pinned this issue Dec 6, 2024
@DaliaDinu DaliaDinu moved this from In Progress to Done in ESN Buddy Matching Program Jan 6, 2025
@DaliaDinu DaliaDinu closed this as completed by moving to Done in ESN Buddy Matching Program Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants