alex_bn_lee

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

随笔分类 -  Python Study / Python & ArcPy

上一页 1 2 3 4 5 6 7 下一页

Python 学习,主要是 ArcGIS 里面有用到!
[889] To enable arcpy in VS Code
摘要:ref: Getting Started with Python in VS Code - Create a virtual environment To enable arcpy in VS Code, you need to configure your Python interpreter t 阅读全文

posted @ 2023-09-26 11:51 McDelfino 阅读(39) 评论(0) 推荐(0) 编辑

[888] How to get the directory of the current Python file
摘要:ref: Get the path of the current file (script) in Python: __file__ To get the directory of the current Python file, you can use the os.path module in 阅读全文

posted @ 2023-09-26 09:02 McDelfino 阅读(13) 评论(0) 推荐(0) 编辑

[887] Some tasks and necessary scripts
该文被密码保护。

posted @ 2023-09-26 07:54 McDelfino 阅读(0) 评论(0) 推荐(0) 编辑

[886] Some useful functions in ArcPy
摘要:Exists: Determines the existence of the specified data object. This function tests for the existence of various data types including feature classes, 阅读全文

posted @ 2023-09-25 15:16 McDelfino 阅读(9) 评论(0) 推荐(0) 编辑

[883] Install Python package using Jupyter Notebook
摘要:In the installation of packages in Jupyter Notebook, I encountered an issue. I installed packages using Command Prompt (CMD), but when I try to import 阅读全文

posted @ 2023-09-22 07:49 McDelfino 阅读(14) 评论(0) 推荐(0) 编辑

[880] Calculate Field in ArcGIS Pro (with python code)
摘要:Firstly, we should define a function. def IsFlood(join_count): if join_count > 0: return "Yes" else: return "No" Secondly, we should call this functio 阅读全文

posted @ 2023-09-21 09:21 McDelfino 阅读(16) 评论(0) 推荐(0) 编辑

【876】Top 50 matplotlib Visualizations – The Master Plots (with full python code)
摘要:ref: Top 50 matplotlib Visualizations – The Master Plots (with full python code) 阅读全文

posted @ 2023-09-05 08:23 McDelfino 阅读(11) 评论(0) 推荐(0) 编辑

【875】numpy复制并扩充维度
摘要:参考:numpy复制并扩充维度 参考:记录 之 numpy扩充某一维度,并重复填充 np.expand_dims():扩充数组的维度,并且制定扩充的维度位置,用axis来指定 repeat():用来复制数组内容在指定的维度上面 transpose():用来转置数组 1.numpy.expand_di 阅读全文

posted @ 2023-09-05 08:14 McDelfino 阅读(1887) 评论(0) 推荐(0) 编辑

【869】dataframe通过包含字符过滤 str.contains()
摘要:ref: [Pandas] 文本包含.str.contains() import pandas as pd df = pd.DataFrame([['liver','E',89,21,24,64], ['Arry','C',36,37,37,57], ['Ack','A',57,60,18,84], 阅读全文

posted @ 2023-08-12 07:25 McDelfino 阅读(14) 评论(0) 推荐(0) 编辑

【855】country converter, ISO alpha 3
摘要:Ref: country-converter 1.0.0 Ref: Python-pycountry | Understand How to Use pycountry These two python libraries are both used to process information a 阅读全文

posted @ 2023-07-09 11:12 McDelfino 阅读(13) 评论(0) 推荐(0) 编辑

【853】numpy里面替换值
摘要:参考:How to Replace Elements in NumPy Array (3 Examples) You can use the following methods to replace elements in a NumPy array: Method 1: Replace Eleme 阅读全文

posted @ 2023-07-06 07:48 McDelfino 阅读(59) 评论(0) 推荐(0) 编辑

【850】numpy处理日期数据
摘要:参考:Add Months to datetime Object in Python ☀☀☀<< 举例 >>☀☀☀ # import packages import pandas as pd # adding months to a particular date present = '2022-0 阅读全文

posted @ 2023-07-03 10:42 McDelfino 阅读(23) 评论(0) 推荐(0) 编辑

【847】create geoDataFrame from dataframe
摘要:Ref: From WKT format Firstly, we already have a dataframe, and there is a column of geometry. But this column is in the format of the string, therefor 阅读全文

posted @ 2023-06-30 08:54 McDelfino 阅读(9) 评论(0) 推荐(0) 编辑

【846】自定义cmap,用于GeoPandas、matplotlib制图
摘要:参考:自定义颜色条教程 import matplotlib as mpl cmap = mpl.colors.ListedColormap(['yellow', '#E0E0E0']) africa_gdf.plot(column='hotspot_category', cmap=cmap, leg 阅读全文

posted @ 2023-06-30 08:38 McDelfino 阅读(62) 评论(0) 推荐(0) 编辑

【843】dataframe相关操作 (match merge)
摘要:Reference: Python for Data Analysis, 3E - Pandas pandas.DataFrame.merge 29-April-2024 use to_string() to print the entire DataFrame. Check the number 阅读全文

posted @ 2023-06-15 18:31 McDelfino 阅读(19) 评论(0) 推荐(0) 编辑

【842】GeoPandas设置坐标系
摘要:参考:geopandas--坐标系学习 gdf.crs = 'EPSG:4326' 阅读全文

posted @ 2023-06-15 10:44 McDelfino 阅读(36) 评论(0) 推荐(0) 编辑

【841】shapely合并多个Polygon/MultiPolygon
摘要:参考:Converting list of polygons to multipolygon using shapely? MultiPolygon -> Polygon list list(multiPoly.geoms) Polygon list -> MultiPolygon shapely. 阅读全文

posted @ 2023-06-13 18:54 McDelfino 阅读(666) 评论(0) 推荐(0) 编辑

【839】pandas 筛选某个值在某个列表中 isin
摘要:参考:pandas 筛选某个值在某个列表中 isin #筛选某个值在某个列表中 df = df[df['subject_1'].isin([1, 2, 13, 18, 25])] 阅读全文

posted @ 2023-06-09 15:16 McDelfino 阅读(24) 评论(0) 推荐(0) 编辑

【801】Python绘制机器学习特征相关性热力图
该文被密码保护。

posted @ 2023-01-16 07:13 McDelfino 阅读(347) 评论(0) 推荐(0) 编辑

【800】机器学习特征重要性可视化
摘要:参考:数据科学 | 避坑!Python特征重要性分析中存在的问题 模型代码(复制前一个博客的内容): 查看代码 from sklearn.model_selection import train_test_split X_train, X_test, y_train, y_test = train_ 阅读全文

posted @ 2023-01-14 16:25 McDelfino 阅读(804) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 下一页
点击右上角即可分享
微信分享提示