摘要:ref: [R字符串] 字符串长度、分割、拼接、截取、替代、匹配和大小写替换 ref: R String Manipulation Functions 1. nchar() With the help of this function, we can count the characters. Th
阅读全文
摘要:ref: R语言data.frame常用操作 ref: Keep rows that match a condition The filter() function is used to subset a data frame, retaining all rows that satisfy you
阅读全文
摘要: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
阅读全文
摘要:参考:自定义颜色条教程 import matplotlib as mpl cmap = mpl.colors.ListedColormap(['yellow', '#E0E0E0']) africa_gdf.plot(column='hotspot_category', cmap=cmap, leg
阅读全文
摘要:参考:case_when: A general vectorised if Others 用 TRUE 表示,举例如下: x <- 1:50 case_when( x %% 35 == 0 ~ "fizz buzz", x %% 5 == 0 ~ "fizz", x %% 7 == 0 ~ "buz
阅读全文
摘要:Reference: Python for Data Analysis, 3E - Pandas pandas.DataFrame.merge 29-April-2024 use to_string() to print the entire DataFrame. Check the number
阅读全文
摘要:参考:geopandas--坐标系学习 gdf.crs = 'EPSG:4326'
阅读全文
摘要:参考:Converting list of polygons to multipolygon using shapely? MultiPolygon -> Polygon list list(multiPoly.geoms) Polygon list -> MultiPolygon shapely.
阅读全文
摘要:参考:pandas 筛选某个值在某个列表中 isin #筛选某个值在某个列表中 df = df[df['subject_1'].isin([1, 2, 13, 18, 25])]
阅读全文