anweiguo 6 hónapja
commit
0e6687dcc1

+ 3 - 0
.idea/.gitignore

@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml

+ 12 - 0
.idea/inspectionProfiles/Project_Default.xml

@@ -0,0 +1,12 @@
+<component name="InspectionProjectProfileManager">
+  <profile version="1.0">
+    <option name="myName" value="Project Default" />
+    <inspection_tool class="PyUnresolvedReferencesInspection" enabled="true" level="WARNING" enabled_by_default="true">
+      <option name="ignoredIdentifiers">
+        <list>
+          <option value="lightning.pytorch.callbacks.checkpoint.Checkpoint.*" />
+        </list>
+      </option>
+    </inspection_tool>
+  </profile>
+</component>

+ 6 - 0
.idea/inspectionProfiles/profiles_settings.xml

@@ -0,0 +1,6 @@
+<component name="InspectionProjectProfileManager">
+  <settings>
+    <option name="USE_PROJECT_PROFILE" value="false" />
+    <version value="1.0" />
+  </settings>
+</component>

+ 7 - 0
.idea/misc.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="Black">
+    <option name="sdkName" value="Python 3.9 (2)" />
+  </component>
+  <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.9 (2)" project-jdk-type="Python SDK" />
+</project>

+ 8 - 0
.idea/modules.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/.idea/pytorchProject.iml" filepath="$PROJECT_DIR$/.idea/pytorchProject.iml" />
+    </modules>
+  </component>
+</project>

+ 8 - 0
.idea/pytorchProject.iml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="PYTHON_MODULE" version="4">
+  <component name="NewModuleRootManager">
+    <content url="file://$MODULE_DIR$" />
+    <orderEntry type="jdk" jdkName="Python 3.9 (2)" jdkType="Python SDK" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>

BIN
data/__pycache__/data.cpython-39.pyc


+ 9 - 0
data/data.py

@@ -0,0 +1,9 @@
+import pandas as pd
+
+
+def general_data():
+    data = pd.DataFrame({'name':['LiNing','HanMeimei','XiaoMing','LiGang','XiaoHong'],
+                         'sex':['male','female','male','male','female'],
+                         'age':[17,18,16,18,19]})
+    return data
+

+ 8 - 0
main.py

@@ -0,0 +1,8 @@
+from data.data import general_data
+from process.data_processing import age_add
+if __name__ == "__main__":
+    print("Program starts execution!")
+    df = general_data()
+    result_df = age_add(df, 'age')
+    print(result_df)
+    print("server start!")

BIN
process/__pycache__/data_processing.cpython-39.pyc


+ 4 - 0
process/data_processing.py

@@ -0,0 +1,4 @@
+
+def age_add(df, col_age):
+    df[col_age] = df[col_age] + 1
+    return df