SteveHong1901 / UCL-STAT0006-Data-Analysis-Project-1

0 stars 0 forks source link

Img #10

Open SteveHong1901 opened 3 days ago

SteveHong1901 commented 3 days ago

import pandas as pd

# Assuming your dataframe is named df
# Example of dataframe creation
# df = pd.DataFrame({'matched_name': [...]})

# Dictionary of university names to replace
universities = {
    'Harvard University': ['Harvard'],
    'University of Cambridge': ['Cambridge University', 'Cambridge'],
    'University of Oxford': ['Oxford University', 'Oxford'],
    'Yale University': ['Yale'],
    'Stanford University': ['Stanford'],
    'Massachusetts Institute of Technology (MIT)': ['MIT', 'Massachusetts Institute of Technology'],
    'California Institute of Technology (Caltech)': ['Caltech', 'California Institute of Technology'],
    'University of Chicago': ['University of Chicago', 'Chicago University'],
    'Princeton University': ['Princeton'],
    'Columbia University': ['Columbia University', 'Columbia']
}

# Replace variations with official names
for official_name, variations in universities.items():
    pattern = '|'.join(variations)
    df['matched_name'] = df['matched_name'].str.replace(pattern, official_name, case=False, regex=True)

# Display the updated dataframe
print(df)
SteveHong1901 commented 3 days ago

import pandas as pd

# Example dataframe creation
# df = pd.DataFrame({'matched_name': [...]})

# List of universities with variations
universities = {
    'Harvard University': 'Harvard',
    'University of Cambridge': 'Cambridge',
    'University of Oxford': 'Oxford',
    'Yale University': 'Yale',
    'Stanford University': 'Stanford',
    'Massachusetts Institute of Technology (MIT)': 'MIT|Massachusetts Institute of Technology',
    'California Institute of Technology (Caltech)': 'Caltech|California Institute of Technology',
    'University of Chicago': 'University of Chicago|Chicago University',
    'Princeton University': 'Princeton',
    'Columbia University': 'Columbia University|Columbia'
}

# Replace variations with official names
for official_name, pattern in universities.items():
    df.loc[df['matched_name'].str.contains(pattern, case=False, na=False), 'matched_name'] = official_name

# Display the updated dataframe
print(df)
SteveHong1901 commented 3 days ago

Here are some of the best universities in Europe outside of the UK, with a particular focus on those in France:

### Top Universities in Europe (Outside the UK)
1. **ETH Zurich** (Switzerland) - Renowned for its cutting-edge research and strong emphasis on science and technology.
2. **Technical University of Munich** (Germany) - Known for its engineering programs and innovative research.
3. **École Polytechnique Fédérale de Lausanne (EPFL)** (Switzerland) - A leading institution in engineering and technology.
4. **LMU Munich** (Germany) - Offers a wide range of programs and is known for its strong research output.
5. **KU Leuven** (Belgium) - One of the oldest universities in Europe with a strong international reputation.

### Top Universities in France
1. **Université PSL (Paris Sciences & Lettres)** - Ranked highly for its research and multidisciplinary approach. It is one of the top institutions in Europe [oai_citation:1,European University Rankings 2024 | Top Universities](https://www.topuniversities.com/europe-university-rankings) [oai_citation:2,Top universities in Europe | Top Universities](https://www.topuniversities.com/where-to-study/region/europe/top-universities-europe).
2. **Sorbonne University** - Known for its humanities and social sciences programs, as well as its contributions to science [oai_citation:3,Best universities in Europe 2024 | Student](https://www.timeshighereducation.com/student/best-universities/best-universities-europe) [oai_citation:4,Top universities in Europe | Top Universities](https://www.topuniversities.com/where-to-study/region/europe/top-universities-europe).
3. **Université Paris-Saclay** - Particularly strong in the sciences and mathematics, it is recognized for its research output [oai_citation:5,Rankings released! QS World University Rankings: Europe 2024 - QS](https://www.qs.com/rankings-released-qs-world-university-rankings-europe-2024/) [oai_citation:6,Top universities in Europe | Top Universities](https://www.topuniversities.com/where-to-study/region/europe/top-universities-europe).
4. **Institut Polytechnique de Paris** - A relatively new institution that brings together several prestigious engineering schools, known for its innovation and technology programs [oai_citation:7,Best universities in Europe 2024 | Student](https://www.timeshighereducation.com/student/best-universities/best-universities-europe) [oai_citation:8,Top universities in Europe | Top Universities](https://www.topuniversities.com/where-to-study/region/europe/top-universities-europe).
5. **École Normale Supérieure de Lyon** - Focuses on training researchers and teachers and is highly regarded for its humanities and sciences programs [oai_citation:9,Best Universities in Europe [EduRank.org 2024 Rankings]](https://edurank.org/geo/eu/).

These universities are well-regarded globally and offer a variety of programs across different fields of study. They are particularly known for their research excellence and international collaboration [oai_citation:10,Best universities in Europe 2024 | Student](https://www.timeshighereducation.com/student/best-universities/best-universities-europe) [oai_citation:11,Rankings released! QS World University Rankings: Europe 2024 - QS](https://www.qs.com/rankings-released-qs-world-university-rankings-europe-2024/) [oai_citation:12,Best Universities in Europe [EduRank.org 2024 Rankings]](https://edurank.org/geo/eu/).
SteveHong1901 commented 2 days ago

pip install https://github.com/explosion/spacy-models/releases/download/en_core_web_lg-3.3.0/en_core_web_lg-3.3.0.tar.gz