Created
March 1, 2022 16:14
-
-
Save brycepg/2b6e2f78bd3f5c810cd96ceffc7b6905 to your computer and use it in GitHub Desktop.
Print out inferred types of DataFrame
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import astroid | |
import astroid; astroid.context.InferenceContext.max_inferred = 500 | |
ret = astroid.extract_node(""" | |
import pandas as pd | |
df = pd.read_csv("some.csv") | |
df #@ | |
df.columns | |
df.columns # | |
""") | |
inferred = ret.inferred() | |
print(inferred) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment