当前位置:网站首页>pycaret source code analysis: download dataset\Lib\site-packages\pycaret\datasets.py
pycaret source code analysis: download dataset\Lib\site-packages\pycaret\datasets.py
2022-08-01 00:03:00 【Artificial Intelligence Zeng Xiaojian】

def get_data(
dataset="index",
save_copy=False,
profile=False,
verbose=True,
address="https://raw.githubusercontent.com/pycaret/pycaret/master/datasets/",
):
"""
This function loads sample datasets from git repository. List of available
datasets can be checked using ``get_data('index')``.
Example
-------
>>> from pycaret.datasets import get_data
>>> all_datasets = get_data('index')
>>> juice = get_data('juice')
dataset: str, default = 'index'
Index value of dataset.
save_copy: bool, default = False
When set to true, it saves a copy in current working directory.
profile: bool, default = False
When set to true, an interactive EDA report is displayed.
verbose: bool, default = True
When set to False, head of data is not displayed.
address: string, default = "https://raw.githubusercontent.com/pycaret/pycaret/master/datasets/"
Download url of dataset. For people have difficulty linking to github, they can change
the default address to their own (e.g. "https://gitee.com/IncubatorShokuhou/pycaret/raw/master/datasets/")
Returns:
pandas.DataFrame
Warnings
--------
- Use of ``get_data`` requires internet connection.
"""
import pandas as pd
import os.path
from IPython.display import display, HTML, clear_output, update_display
extension = ".csv"
filename = str(dataset) + extension
complete_address = address + filename
if os.path.isfile(filename):
data = pd.read_csv(filename)
else:
data = pd.read_csv(complete_address)
# create a copy for pandas profiler
data_for_profiling = data.copy()
if save_copy:
save_name = filename
data.to_csv(save_name, index=False)
if dataset == "index":
display(data)
else:
if profile:
import pandas_profiling
pf = pandas_profiling.ProfileReport(data_for_profiling)
display(pf)
else:
if verbose:
display(data.head())
return data
边栏推荐
- date命令
- 高等代数_证明_任何矩阵都相似于一个上三角矩阵
- Web API 介绍和类型
- [QNX Hypervisor 2.2 User Manual]9.16 system
- How to import a Golang external package and use it?
- MLP神经网络,GRNN神经网络,SVM神经网络以及深度学习神经网络对比识别人体健康非健康数据
- 【Acwing】第62场周赛 题解
- Input and output optimization
- 【FPGA教程案例43】图像案例3——通过verilog实现图像sobel边缘提取,通过MATLAB进行辅助验证
- mysql having的用法
猜你喜欢
![[MATLAB project combat] LDPC-BP channel coding](/img/37/4777e4d05cb2dbb1865f1d05ae9878.png)
[MATLAB project combat] LDPC-BP channel coding

虹科分享|如何用移动目标防御技术防范未知因素

Network security - crack WiFi through handshake packets (detailed tutorial)

TFC CTF 2022 WEB Diamand WriteUp

Matlab/Arcgis processing nc data

谷歌『云开发者速查表』;清华3D人体数据集;商汤『通用视觉框架』公开课;Web3极简入门指南;高效深度学习免费书;前沿论文 | ShowMeAI资讯日报

一体化步进电机在无人机自动机场的应用

【1161. 最大层内元素和】

UOS - WindTerm use

景区手绘地图的绘制流程
随机推荐
C# Rectangle basic usage and picture cutting
leetcode:126. 单词接龙 II
继承的注意事项
(26)Blender源码分析之顶层菜单的关于菜单
Handwritten a simple web server (B/S architecture)
输入输出优化
力扣二叉树
助力数字政府建设,中科三方构建域名安全保障体系
Xinao Learning Plan The Road to Informatics Competition (2022.07.31)
Binary tree traversal non-recursive program -- using stack to simulate system stack
NgRx 里 first 和 take(1) 操作符的区别
Redis五种数据类型简介
编译型语言和解释型语言的区别
[Reading Notes -> Data Analysis] 02 Data Analysis Preparation
WindowInsetsControllerCompat is simple to use
Keil nRF52832下载失败
Advanced Algebra _ Proof _ Any matrix is similar to an upper triangular matrix
周总结
【MATLAB项目实战】LDPC-BP信道编码
面试题:实现死锁