Coder Social home page Coder Social logo

py92's Introduction

PY92

快速确定**的学校是否是

  • 985
  • 211
  • 双一流
  • 本科
  • 民办
  • QS2024 TOP 1500

下版本(v1.0.4)目标

  • 增加英文学校信息
  • 考虑是否添加一二本属性(有争议)
  • 准备开发[QS, USNEWS, 泰晤士]TOP1000院校信息表
    • QS2024 实际获取QSTOP1500
    • USNEWS
    • 泰晤士
  • 自动推送pypi

数据来源

国内院校:大学生必备网 -> cn_schools.csv QS2024:QS2024

如果学校类型有误、遗漏学校,欢迎提交issue。

安装

pip install py92

or

pip instlal py92 -U

or

pip install git+https://github.com/stanleysun233/py92.git

本库仅依赖pandas

示例

前言:

  • 如果是,返回1;
  • 如果不是,返回0;
  • 如果不在清单返回-1。(例如海外院校或者遗漏情况)

先引用库

import py92
  1. is_in(name) 返回学校是否在清单中。
print(py92.is_in("北京大学")) # 1
print(py92.is_in("上海海事大学")) # 1
print(py92.is_in("纽约大学")) # 0
  1. is_985 返回学校是否属于985
print(py92.is_985("北京大学"))  # 1
print(py92.is_985("上海海事大学"))  # 0
print(py92.is_985("纽约大学")) # -1
  1. is_211 返回学校是否属于211
print(py92.is_211("北京大学"))  # 1
print(py92.is_211("上海大学")) # 1
print(py92.is_211("上海海事大学"))  # 0
  1. is_db1 返回学校是否属于双一流
print(py92.is_db1("北京大学"))  # 1
print(py92.is_db1("上海海洋大学")) # 1
print(py92.is_db1("上海海事大学"))  # 0
  1. is_university 返回学校是否属于本科
print(py92.is_university("上海海事大学"))  # 1
print(py92.is_university("上海海事职业技术学院"))  # 0
  1. is_public 返回学校是否属于公办
print(py92.is_public("上海建桥学院"))  # 0
print(py92.is_public("上海海事大学"))  # 1
  1. get_highest_label 获取学校最高的标签。 规则:985>211>双一流>本科>专科
print(py92.get_highest_label("上海交通大学"))  # 985
print(py92.get_highest_label("上海大学"))  # 211
print(py92.get_highest_label("上海海洋大学"))  # 双一流
print(py92.get_highest_label("上海海事大学"))  # 本科
print(py92.get_highest_label("上海海事职业技术学院"))  # 专科
  1. get_label 返回学校所有标签。
print(py92.get_label("上海海事大学"))
# {'name': '上海海事大学', '985': 0, '211': 0, '双一流': 0, '本科': 1, '公办': 1}
  1. get_qs 返回学校的qs排名,选填参数year,默认为2024。
print(py92.get_qs("新加坡国立大学"))
8
  1. is_[xxx]s 返回学校组是否属于xxx。 输入:[name1, name2, name3]
schools = ["北京大学","上海海事大学","纽约大学"]
print(py92.is_ins(schools)) # [1, 1, 0]

py92's People

Contributors

stanleysun233 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.