2021年4月3日

摘要: 题目描述 Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its p 阅读全文
posted @ 2021-04-03 09:24 朴素贝叶斯 阅读(29) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Follow up for "Unique Paths": Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty s 阅读全文
posted @ 2021-04-03 08:11 朴素贝叶斯 阅读(30) 评论(0) 推荐(0) 编辑
摘要: 题目描述 A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either down or right at 阅读全文
posted @ 2021-04-03 07:02 朴素贝叶斯 阅读(32) 评论(0) 推荐(0) 编辑

2021年4月1日

摘要: 相同点 都是C++的字符处理函数,把数字字符串转换成int输出 头文件都是#include<cstring> 不同点 atoi()的参数是const char*,因此对于一个字符串str我们必须调用c_str()的方法把这个string转换成const char*类型的,而stoi()的参数是con 阅读全文
posted @ 2021-04-01 23:56 朴素贝叶斯 阅读(231) 评论(0) 推荐(0) 编辑
摘要: 方法1 在C标准库里面,使用atoi(表示 ascii to integer)是把字符串转换成整型数的一个函数int atoi(const char *nptr) 方法2 在C++标准库里面,使用stringstream:(stringstream可以用于各种数据类型之间的转换)。 例子: #inc 阅读全文
posted @ 2021-04-01 22:45 朴素贝叶斯 阅读(3535) 评论(0) 推荐(0) 编辑

2021年3月5日

摘要: 函数定义: DataFrame.reset_index(level=None, drop=False, inplace=False, col_level=0, col_fill='') For DataFrame with multi-level index, return new DataFram 阅读全文
posted @ 2021-03-05 22:46 朴素贝叶斯 阅读(234) 评论(0) 推荐(0) 编辑
摘要: DataFrame.duplicated(self, subset=None, keep='first') Return boolean Series denoting duplicate rows, optionally only considering certain columns. Para 阅读全文
posted @ 2021-03-05 20:37 朴素贝叶斯 阅读(69) 评论(0) 推荐(0) 编辑
摘要: Series.duplicated(self, keep='first') Indicate duplicate Series values. Duplicated values are indicated as True values in the resulting Series. Either 阅读全文
posted @ 2021-03-05 20:21 朴素贝叶斯 阅读(53) 评论(0) 推荐(0) 编辑
摘要: Series.drop_duplicates(self, keep='first', inplace=False) Return Series with duplicate values removed. Parameters: keep : {‘first’, ‘last’, False}, de 阅读全文
posted @ 2021-03-05 20:03 朴素贝叶斯 阅读(101) 评论(0) 推荐(0) 编辑
摘要: DataFrame.drop_duplicates(self, subset=None, keep='first', inplace=False) Return DataFrame with duplicate rows removed, optionally only considering ce 阅读全文
posted @ 2021-03-05 19:39 朴素贝叶斯 阅读(38) 评论(0) 推荐(0) 编辑

导航