原文: PyCoder's Weekly - Issue #418

  • 200429 Zoom.Quiet(大妈) 用时 42 分钟 完成快译
  • 200429 Zoom.Quiet(大妈) 用时 37 分钟 完成格式转抄.

  • Python 2 最后的发布标志叕一个时代的终结

    • RYAN DONOVAN

The final version of Python 2 has been released. As the Python community looks forward to the new era, Ryan Donovan from the Stack Overflow Blog takes some time to reflect on the transition and points out that, while support for Python 2 from official channels may be gone, the language isn’t dead. In fact, there’s reason to believe it will live on for decades to come.

(是也乎:

再次: 不会的, Python 2.x 足以用到下个10年...

)

  • 你应该了解的 Python 3.9 新特性

    • MARTIN HEINZ
    • • Shared by Martin Heinz

Python 3.9 is scheduled for release on May 10, 2020, and it’s packed full of new goodies. Explore these new features in this overview by Martin Heinz, including new dict operators, updates to the math module, new string methods, a functools.ToplogicalSorter class, and more!

(是也乎:

实话, 并不想知道...

一个语言不是靠追加越来越多特性存活的...

)

  • Python pickle 模块: 如何在 Python 中保存对象

    • REAL PYTHON

In this tutorial, you’ll learn how you can use the Python pickle module to convert your objects into a stream of bytes that can be saved to a disk or sent over a network. You’ll also learn the security implications of using this process on objects from an untrusted source.

(是也乎:

pickle 绝对是 Python 内建模块中最迷人的一个, 谁都忍不住溢用她...

)

  • 收集指导委员会问答的问题

    • PYTHON.ORG

As part of PyCon US 2020, the Python Steering Council will record a Q&A. They are soliciting questions from the community, so here’s your chance to get your burning questions answered!

(是也乎:

很认真, 也很无奈...

)

  • 构造 Python 应用 (通用布局)

    • REAL PYTHON
    • course

This course is a reference guide to common Python application layouts and project structures for command-line applications, web applications, and more.

(是也乎:

的确, Python 程序其实,非常 八股文的...

输入->处理->输出, 没了...

)

讨论

Discussions

  • 处理失败

    • REDDIT

It’s not that professional programmers never fail. They’ve just learned how to deal with failure and recover from it—most of the time, anyway. What coping mechanisms have you come up with?

(是也乎:

这不就是调试嘛?

制造失败来检验正确.

)

  • 俺想用一整专注 Python, 应该设定哪些目标?

    • REDDIT

Lots of great advice for new Python programmers in this thread!

(是也乎:

哭述...无尽的...

其实, 最基础的, 一年以内可以用 Python 赚到钱, 那么一切目标都达到了.

)

文章,教程和嗯哼

Articles, Tutorials and Talks

  • Python 中的数字

    • MOSHE ZADKA

Quick quiz: how many numeric data types are there in Python? If you answered “two, duh” then you might be surprised to learn that there are actually four! In addition to int and float, the fractions and decimal standard library modules implement data types used to represent fraction and decimal numbers exactly. Learn about all of Python’s numeric data types, their strengths and weakness, and how to choose the right one in this short-but-informative article from Moshe Zadka.

  • 在坚实的基础上构建: 确保可复用的Docker构建Python

    • ITAMAR TURNER-TRAURING

Docker is a popular tool for distributing applications bundled with their environments. It’s often sold as a cure to the “it worked on my machine” conundrum, but you’re not alone if you’ve found this to be a bit oversold. The issue isn’t with Docker, though. Chances are your images aren’t completely reproducible. In this tutorial, you’ll learn some best practices for creating reproducible Docker builds.

  • 在 Python 中使用警告(或:什么时候例外/不是例外?)

    • RUEVEN LERNER

Imagine you’re maintaining an open-source Python package and you’re going to release a new version with breaking changes. You warn users about those changes in documentation and even blast the info on social media channels. But wouldn’t it be great if you could warn users right in their terminal as their using your tool? Well, with Python’s warnings module, you can! How are warnings different from Python exceptions? Learn how to send and filter warnings, and why you would want to do so.

  • Python 应用中有关配置的最佳实践

    • TOBIAS PFEIFFER

Users love being able to configure an application. But dealing with user configuration means parsing untrusted input, validating that input, and figuring out how to access it safely in all the layers of your applications. Python has a rich configuration ecosystem. Lots of articles focus on how to use various configuration formats in your Python programs but skip out on the finer details of how and when configuration should be validated. This tutorial fills in some of those gaps.

(是也乎:

又来...配置的确是软件工程中比较纠结的一个方面, 不过, 用好 Python 本身就足以在配置上非常自在了;

关键是克制. 嫑在配置文件中包含过多计算/判定/摄取/... 之类行为.

)

  • Python 的 Sets 简介

    • MIKE DRISCOLL

Have you heard about Python’s set data type? A set is an unordered collection of distinct objects that support fast membership tests and can be used to remove duplicates from a sequence. Learn all about this handy data type in this beginner-friendly article from Mike Driscoll.

  • Pandas DataFrame: 使处理数据令人愉快

    • REAL PYTHON

In this tutorial, you’ll get started with Pandas DataFrames, which are powerful and widely used two-dimensional data structures. You’ll learn how to perform basic operations with data, handle missing values, work with time-series data, and visualize data from a Pandas DataFrame.

(是也乎:

使用 Pandas 最大的技巧, 可能就是别怕浪费内存, 能复制时, 一定要复制, 以免纠缠

)

  • 用 Python 和 Redis 进行速率限制

    • ANDREA STAGI
    • • Shared by Andrea Stagi

This article explores rate limiting algorithms using Python and Redis, starting from a naive approach and culminate at an advanced one called Generic Cell Rate Algorithm (GCRA).

  • 手动验证 DKIM签名

    • GITHUB.COM/KMILLE

“We take an email and verify the the DKIM-Signature step by step using Python. We also take care about the signing itself (RSA). Source code included.”

(是也乎:

by hand 就是从头撸, 将 邮件的 DKIM 签名详细刷了一遍

)

  • 用 NumPy 和 Pandas 在 Python 中创建相关矩阵

    • ERIK MARSJA

In this tutorial, you’ll learn how to create a correlation matrix in Python with NumPy and Pandas. Plus upper & lower triangular (tables).

  • 用 Docker 和 GitLab 将 Django 持续部署到 AWS EC2

    • MICHAEL HERMAN
    • • Shared by Michael Herman

(是也乎:

gitlab 在长年陪跑情况下, 终于发现了自己最大的优势, 开始加强 CI/CD 方面的功能, 所以, 大家都来了...

)

  • 在 Django 中 Roll 基于类的视图

    • JAMES TIMMINS
    • • Shared by James Timmins

(是也乎:

嗯哼? 坚持了8年, 周刊终于有越来越多来自社区的自发推荐了... 不容易.

)

  • 用 Python 的 difflib 自制文件比较工具

    • FLORIAN DAHLITZ
    • • Shared by Florian Dahlitz

(是也乎:

嵌入在 CI/CD 过程中就很香了...

)

  • Python Context Manager 奇特案例

    • REDOWAN DELOWAR
    • • Shared by Redowan Delowar

好物

Interesting Projects, Tools and Libraries, Projects & Code

  • flpc: Forth Lisp Python 连续体

    • GITHUB.COM/ASRP

(是也乎:

为了证明这一断言:

Python is Lisp with syntactic sugar and Lisp is Forth with syntactic sugar.

于是发现了叕一个新语言; Forth 是比 Lisp 更加极端的一门小众开发语言.

这样的代码:

fib <- fun[i]:if i < 3:return(1)return(fib(x - 1) + fib(x - 2))

也可以这么表达:

F'
[ pick1 pushi: 3 < [ drop1 1 return ] ifpick1 1 - fib pick2 - fib + s21 drop1 return ] bind: fib
'F

)

  • astropy: 天文学的通用 Python 核心软件包

    • GITHUB.COM/ASTROPY
  • twitter-ticker-tape: Raspberry Pi 通过收据打印机读取推文

    • GITHUB.COM/HEALEYCODES

(是也乎:

自动读取Twitter 并打印成发票以便晚上慢慢读...

)

  • BentoML: 简化模型服务

    • GITHUB.COM/BENTOML
  • taichi: 便携式/高性能/稀疏和可微计算的语言

    • GITHUB.COM/TAICHI-DEV

(是也乎:

全新语言, 专注高效完成物理引擎/粒子系统/...等等需要海量计算的动画自动生成....

已经有丰富的案例, 是的国货. 基于 Python 深度定制.

)

  • LibreLingo: 社区驱动的语言学习平台

    • GITHUB.COM/KANTORD

(是也乎:

这个很牛了...GPLv3; 可以拿来作各种好玩儿的东西了.

)

  • 3d-photo-inpainting: 使用上下文感知的分层深度修补进行3D摄影

    • GITHUB.COM/VT-VL-LAB

(是也乎:

从 3D 空间的理解上自动化处理照片, 华人主力团队成果, PyTorch 为核心.

)

蠎周刊418 ~Pandas DataFrame: 使处理数据令人愉快相关推荐

  1. 在Pandas DataFrame中重塑数据

    目录 介绍 透视Pandas DataFrame 在Pandas DataFrame中对数据进行分组 总结 使用我们的数据集后,我们将快速查看可以使用流行的Python库从数据集轻松创建的可视化,然后 ...

  2. 清理Pandas DataFrame中的数据

    目录 介绍 清理按键 查找不一致的数据 总结 确保整个DataFrame一致是很重要的.这包括确保数据的类型正确,消除不一致之处并标准化值. 下载CSV和数据库文件-127.8 KB 下载源代码122 ...

  3. pandas取第一行数据_Pandas DataFrame 取一行数据会得到Series的方法

    Pandas DataFrame 取一行数据会得到Series的方法 Pandas DataFrame 取一行数据会得到Series的方法 如题,想要取如下dataframe的一行数据,以为得到的还是 ...

  4. 纠正Pandas中的缺失数据

    目录 介绍 查找丢失的数据元素 使用drop和dropna删除缺少的Pandas列 丢掉丢失的Pandas行 替换值 摘要 将数据加载到灵活的结构后,我们需要确定如何处理丢失和重复的数据元素. 下载C ...

  5. 【pandas】dataframe中重复数据比较、筛选、去除等

    当需要的是DataFrame那些重复数据,尤其是要比较重复数据的异同时,就需要将重复数据提取出来时,再关联原数据,并做排序,进行比较. 方法一.主要思路: 1. 采用drop_duplicates对数 ...

  6. pandas基于dataframe字符串数据列不包含特定字符串来筛选dataframe中的数据行(rows where values do not contain substring)

    pandas基于dataframe字符串数据列不包含(not contains)特定字符串来筛选dataframe中的数据行(rows where values do not contain subs ...

  7. pandas将dataframe原有的数据列名称转化为整数数值列名称(convert dataframe column labelsl into integers)

    pandas将dataframe原有的数据列名称转化为整数数值列名称(convert dataframe column labelsl into integers) 目录 pandas将datafra ...

  8. pandas使用sort_values函数将dataframe按照指定数据列的内容对dataframe的数据行进行排序(sort dataframe rows by a specific column

    pandas使用sort_values函数将dataframe按照指定数据列的内容对dataframe的数据行进行排序(sort dataframe rows by a specific column ...

  9. pandas使用np.where函数计算返回dataframe中指定数据列包含缺失值的行索引列表list

    pandas使用np.where函数计算返回dataframe中指定数据列包含缺失值的行索引列表list(index of rows with missing values in dataframe ...

最新文章

  1. 大型网站架构系列:电商网站架构案例(2)
  2. python学习框架图-Python学习---Python的框架基础学习
  3. 10.PHP加密相关
  4. Neo4j实战 (数据库技术丛书)pdf
  5. ueditor php版使用,ueditor 1.2.6 使用方法说明
  6. Java一分钟 || Docker因权限问题无法启动Springboot怎么办
  7. random(随机函数生成)
  8. CCF - 201703-1 - 分蛋糕
  9. 【LeetCode笔记】200. 岛屿数量(Java、DFS)
  10. 彩色手绘元宵节插画风素材图片
  11. 谷歌浏览器设置新标签页地址的方法
  12. 常见的十大量化投资策略(附源码)
  13. taptap领取礼包显示服务器繁忙,原神taptap预约奖励领取教程 taptap预约奖励怎么领取...
  14. c语言课程设计三色球问题,C++三色球问题描述与算法分析
  15. 百度网盘,实现免费不限速,10M/S?都是假的
  16. 如果感觉没有动力或是心情很失落,那就听听战歌吧!(可免费下载)
  17. Python量化交易实战:获取股票数据并做分析处理
  18. 四足机器人的六种步态特征
  19. 量化投资发展史上的那些“决定性瞬间”
  20. 5大代码规则,守护程序猿世界的爱与和平!

热门文章

  1. STC15单片机实战项目 - 新建工程(软件开发)
  2. SQLServer修改数据
  3. 机器学习综述与“Hello World”实战
  4. 12星座情人圣诞礼物建议
  5. mysql相关聚合函数应用商品分类表
  6. PHP使用C语言扩展
  7. 如何查看数据库当前连接数和最大连接数
  8. 后台服务出现明显“变慢”诊断思路
  9. 在腾讯云轻量应用服务器上自建网盘教程
  10. mysql 8.0 慢查询_MySQL慢查询 - 开启慢查询