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

上一页 1 2 3 4 5 6 7 8 9 10 ··· 21 下一页

Study of Python.
[967] Merge multiple polygons into a single unified polygon
摘要:In Shapely, you can use the unary_union method to merge a list of polygons into a single, unified polygon. Here's an example: from shapely.geometry im 阅读全文

posted @ 2024-02-08 13:58 McDelfino 阅读(19) 评论(0) 推荐(0) 编辑

[966] Merge two DataFrames horizontally
摘要:In Pandas, you can use the pd.concat function to merge two DataFrames horizontally (i.e., along columns). Here's an example: import pandas as pd # Sam 阅读全文

posted @ 2024-02-08 13:56 McDelfino 阅读(8) 评论(0) 推荐(0) 编辑

[965] Generate a new empty DataFrame with the same columns as an existing DataFrame in Pandas
摘要:To generate a new empty DataFrame with the same columns as an existing DataFrame in Pandas, you can use the pd.DataFrame constructor and pass the colu 阅读全文

posted @ 2024-02-08 13:54 McDelfino 阅读(8) 评论(0) 推荐(0) 编辑

[964] Convert a DataFrame to a GeoDataFrame
摘要:To convert a DataFrame to a GeoDataFrame in Pandas, you can use the geopandas.GeoDataFrame constructor and provide the geometry column. Here's an exam 阅读全文

posted @ 2024-02-08 13:51 McDelfino 阅读(37) 评论(0) 推荐(0) 编辑

[963] DataFrame to GeoDataFrame, GeoDataFrame.to_file() raises ValueError: Invalid field type <class 'numpy.int64'>
该文被密码保护。

posted @ 2024-02-08 13:45 McDelfino 阅读(0) 评论(0) 推荐(0) 编辑

[962] ArcGIS Pro - Calculate Field by Python
摘要:ref: Calculate Field Python examples An example: 阅读全文

posted @ 2024-02-05 08:12 McDelfino 阅读(14) 评论(0) 推荐(0) 编辑

[960] API Deployment - Contamination Certificate
该文被密码保护。

posted @ 2024-01-25 12:48 McDelfino 阅读(0) 评论(0) 推荐(0) 编辑

[959] Automation of Contamination Certificates
该文被密码保护。

posted @ 2024-01-24 08:45 McDelfino 阅读(0) 评论(0) 推荐(0) 编辑

[958] Update the attachments (from the Google Drive or the local disk) in a table of the Airtable
该文被密码保护。

posted @ 2024-01-24 08:25 McDelfino 阅读(0) 评论(0) 推荐(0) 编辑

[957] Upload files to Google Drive by Python
该文被密码保护。

posted @ 2024-01-23 13:55 McDelfino 阅读(0) 评论(0) 推荐(0) 编辑

[952] Extract text from a PDF file (PyMuPDF | MuPDF | fitz)
摘要:Using PyMuPDF (MuPDF) First, we need to install the PyMuPDF library: pip install pymupdf Then, we can use the following code to extract text from a PD 阅读全文

posted @ 2023-11-24 07:43 McDelfino 阅读(76) 评论(0) 推荐(0) 编辑

[951] Understanding the pattern of "(.*?)" in Python's re package
摘要:In Python's regular expressions, (.*?) is a capturing group with a non-greedy quantifier. Let's break down the components: ( and ): Parentheses are us 阅读全文

posted @ 2023-11-22 13:14 McDelfino 阅读(8) 评论(0) 推荐(0) 编辑

[950] Python RegEx (re library)
摘要:ref: Python RegEx A RegEx, or Regular Expression, is a sequence of characters that forms a search pattern. RegEx can be used to check if a string cont 阅读全文

posted @ 2023-11-22 12:46 McDelfino 阅读(21) 评论(0) 推荐(0) 编辑

[949] Using re to extract unstructured tables of PDF files
摘要:Here is the problem, this unstructured table of a PDF file can not be extrcted as a table directly. We can only extract the whole texts of every page. 阅读全文

posted @ 2023-11-22 11:21 McDelfino 阅读(15) 评论(0) 推荐(0) 编辑

[948] Extract PDF tables that have cells with multiple lines
摘要:If your PDF tables have cells with multiple lines, and you want to merge those lines within the same cell when extracting the table, you might need a 阅读全文

posted @ 2023-11-21 07:58 McDelfino 阅读(29) 评论(0) 推荐(0) 编辑

[947] Batch rename columns in a Pandas DataFrame
摘要:To batch rename columns in a Pandas DataFrame, we can use the rename method. Here is an example: import pandas as pd # Sample DataFrame data = {"ID": 阅读全文

posted @ 2023-11-21 07:36 McDelfino 阅读(11) 评论(0) 推荐(0) 编辑

[946] Add a new row to a Pandas DataFrame
摘要:To add a new row to a Pandas DataFrame, we can use the append method or the loc indexer. Here are examples of both methods: Using append method: impor 阅读全文

posted @ 2023-11-21 07:26 McDelfino 阅读(19) 评论(0) 推荐(0) 编辑

[945] Replacing a string in all cells of a Pandas DataFrame
摘要:To replace a string in all cells of a Pandas DataFrame, we can use the str.replace() method, which allows us to perform string replacements on each el 阅读全文

posted @ 2023-11-20 14:07 McDelfino 阅读(8) 评论(0) 推荐(0) 编辑

[944] Extracting tables from a PDF in Python
摘要:To extract tables from a PDF in Python, we can use several libraries. One popular choice is the tabula-py library, which is a Python wrapper for Apach 阅读全文

posted @ 2023-11-20 13:24 McDelfino 阅读(45) 评论(0) 推荐(0) 编辑

[943] Converting a GeoJSON file to a Shapefile in Python
摘要:To convert a GeoJSON file to a Shapefile in Python, you can use the geopandas library, which provides convenient tools for working with geospatial dat 阅读全文

posted @ 2023-11-17 07:28 McDelfino 阅读(22) 评论(0) 推荐(0) 编辑

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